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 CCS Technical Support

Internal EEPROM issues

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



Joined: 27 Sep 2011
Posts: 3
Location: USA, midwest

View user's profile Send private message

Internal EEPROM issues
PostPosted: Tue Sep 27, 2011 6:58 am     Reply with quote

We have been using the 16F886 for a few years now and are having issues with the internal EEPROM randomly changing data.

Has anyone else experienced this and if so, how did you solve it.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Tue Sep 27, 2011 7:25 am     Reply with quote

how do you know the problem is in eeprom storage?

do you checksum your data and detect errors that way ?

when an error occurs - does it affect ALL stored values or just SOME?

do you UPDATE EEPROM frequently ?

in situations where i stored initial data like serial numbers, calibration etc - and protected with checksums - but have NOT overwritten frequently - i have never heard of a failure to read accurately.

checking data integrity and adding a fallback is the first line of defense.


a more complete narration of your conditions would help
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Sep 27, 2011 4:18 pm     Reply with quote

Quote:
for a few years now

What compiler version was used to compile the code in these PICs ?

This thread has links to posts on data eeprom corruption:
http://www.ccsinfo.com/forum/viewtopic.php?t=37757
jrbrown59



Joined: 27 Sep 2011
Posts: 3
Location: USA, midwest

View user's profile Send private message

PostPosted: Tue Sep 27, 2011 7:17 pm     Reply with quote

We have used compiler from 4.052 up through 4.121.

The eeprom data is validated with a checksum and a copy of the data is mirrored in the upper half of the eeprom. At startup, the lower memory is checked against the checksum and if not correct, the upper section is checked. If that checksum is correct, the upper section is copied to the lower section. If both checksums are incorrect then an error is flagged.

When we get a returned system with this error, I compare the upper and lower eeprom sections and it is usually just one byte in error.

I notice that when using the write_eeprom() function supplied with the compiler, when the GIE bit is cleared, the compiler does not re-read the bit to confirm it was cleared, as the data sheets suggest.

We have written our own routine that checks that the GIE has been cleared and also verify the written data.
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