CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

12f675 doesn´t write/read EEPROM

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
jaga
Guest







12f675 doesn´t write/read EEPROM
PostPosted: Thu Mar 12, 2009 12:04 am     Reply with quote

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







PostPosted: Thu Mar 12, 2009 3:26 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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