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

Prevent CCS C from using EEPROM question...

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








Prevent CCS C from using EEPROM question...
PostPosted: Thu May 17, 2007 9:26 am     Reply with quote

Sorry for asking such dumb question, but I'm new to CCS C and this PIC programming stuff...

My question is how do you prevent CCS C compiler from using the EEPROM space for variables, data storage, or even code (If it infact does).

I want to use (better yet reserve) some space on the EEPROM for my configuration variables.

My problem is: Upon a fresh flash of the .HEX to the PIC, I can use the EEPROM to store configuration values; however, after x number of times of turning the system off and on, I am no longer able to save new values to those same regions. What am I doing wrong.

I'm using a PIC18F4620 and PCWH 4.x

If this question is already addressed somewhere on here, please refer me to that link. Thanks in advanced.
Ttelmah
Guest







PostPosted: Thu May 17, 2007 9:58 am     Reply with quote

It doesn't.
How often are you writing these values?. The write life of the EEPROM, is limited, and if (for instance), you write a value every second to the EEPROM, the minimum 'life' can be used in just over a day.
If (accidentally), your code kept rebooting, or going through the 'write' routine, it is possible to use the entire life up, in just over 6 minutes!...

Best Wishes
Guest








PostPosted: Thu May 17, 2007 11:02 am     Reply with quote

I wasn't sure whether CCS C compiler is generating code to use the EEPROM during runtime... but it doesn't right? Good.

I don't write the EEPROM enough to kill it... Maybe 20 times a day during testing and development. 20 x 120 bytes total around there.

Thanks for the insight on the "life" of the EEPROM -- I didn't know about that.

I need to do more digging...
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