|
|
View previous topic :: View next topic |
Author |
Message |
jaga Guest
|
12f675 doesn´t write/read EEPROM |
Posted: Thu Mar 12, 2009 12:04 am |
|
|
hi,
I´m developing an application that needs store in eeprom,
I use first
Code: |
write_eeprom(0,12);
read_eeprom(0);
val=read_eeprom(0);
printf("%u",val);
|
it works fine but when i program the micro to read only it read just 255 instead of 12.
Code: |
val=read_eeprom(0);
printf("%u",val);
|
|
|
|
Ttelmah Guest
|
|
Posted: Thu Mar 12, 2009 3:26 am |
|
|
When you program the micro, you normally erase the EEPROM at the same time.
Most programmers will have settings in their configuration, for which parts to program (normally one for 'program memory', one for 'EEPROM', and one for the 'configuration'). You need to disable the one for EEPROM. Then separately, there will be an 'erase' setting, Typically one for 'bulk erase', one for 'erase as needed', and oe for 'no erase'. You need to select the one for 'erase as needed', otherwise the programmer will perform a bulk erase, which includes the EEPROM. The names will vary a little according to your programmer, and which version it's code is. If you can't identify the right one, then post the make of programmer and what version it's code is.
Best Wishes |
|
|
|
|
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
|