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

mysql_write() & EEADR

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



Joined: 10 Feb 2011
Posts: 241
Location: Vancouver, BC

View user's profile Send private message

mysql_write() & EEADR
PostPosted: Fri Mar 09, 2012 4:21 pm     Reply with quote

Hi,

I was wondering if the compiler function write_ and read_eeprom() set EEADR to an unused address as it is recommended in the errata of various PIC controllers. I've seen messed up values in my EEPROM and started to do some research and I found that spurious writes can happen on power down and to avoid getting your data corrupted, set EEADR to an unused location after every each read or write cycle. Now I was wondering if the compiler functions do so already or if it's smarter to write my own read and write function and set the EEADR manually to an unused location...
Any hints & tips are appreciated!

Thanks,
Ron
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Mar 09, 2012 4:46 pm     Reply with quote

Make a short test program with just a call to read_eeprom() and
write_eeprom() in main(). Set the .LST file format to "Symbolic" in the
Project Build Options menu. Then compile it and look at the .LST file.
You should be able to see what the compiler is doing with the EEADR register.
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