|
|
View previous topic :: View next topic |
Author |
Message |
Guest
|
Prevent CCS C from using EEPROM question... |
Posted: Thu May 17, 2007 9:26 am |
|
|
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
|
|
Posted: Thu May 17, 2007 9:58 am |
|
|
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
|
|
Posted: Thu May 17, 2007 11:02 am |
|
|
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... |
|
|
|
|
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
|