|
|
View previous topic :: View next topic |
Author |
Message |
pebbert9
Joined: 31 Dec 2010 Posts: 39
|
PIC18F14K50 internal EEPROM |
Posted: Fri Apr 01, 2011 2:41 pm |
|
|
I am trying to write to the internal EEPROM of the PIC18F14K50
I run the following code and it seems to read and write, but when I comment out the write operation and just do the read, it's not reading the data that was previously written.
Is there a fuse I'm missing?
Code: | #include <18F14K50.h>
#fuses HS,NOWDT,NOLVP,MCLR,PUT,NODEBUG,BROWNOUT,NOWRTD,NOCPD
#use delay(crystal=12000000)
#use rs232(baud=9600, UART1, errors)
void main()
{
char value;
write_eeprom (1, '$');
value = read_eeprom (1);
printf("\r\nData: %c", value);
while (TRUE) {
}
} |
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Apr 01, 2011 2:46 pm |
|
|
Your programming software is probably erasing the eeprom. Look in the
setup window for your programmer (i.e., MPLAB, etc.) and tell it to
preserve the eeprom. |
|
|
pebbert9
Joined: 31 Dec 2010 Posts: 39
|
|
Posted: Fri Apr 01, 2011 3:05 pm |
|
|
Thank you, I had to disable it in CCSLOAD. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|