View previous topic :: View next topic |
Author |
Message |
RKnapp
Joined: 23 Feb 2004 Posts: 51
|
ICD-U40 seems to erase internal EEPROM. Possible to avoid? |
Posted: Wed May 18, 2005 2:27 pm |
|
|
Dear Friends,
I'm (back to) programming (after a long absence) an 18F8520 using the ICD-U40 dongle. Compiler is PCWH v3.224 and the dongle firmware is CCS v1.39 Rev #97.
I wanted to create a calibration procedure for an A/D and store the resulting cal factors in the internal "Data EEPROM." My s/w should start up, get its cal factors, then run. I wouldn't be changing these cal factors often; perhaps once a year.
I have had some success writing info to the EEPROM using the CCS function calls read_eeprom() and write_eeprom(), but I notice that every new version I download to the processor using the dongle wipes clean the 1024-byte EEPROM -- sets it entirely into 0xFF's.
That's no good! I can't be losing my cal factors every time I tweak the s/w. I need to store floating-point gains and offsets for 12 channels; it works out to be at least 96 bytes.
a) Does anyone know how to keep the dongle from erasing the EEPROM?
b) Or can anyone suggest a better place to store these constants? (and if so, provide a code example if possible?)
Thanks,
Robert |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
RKnapp
Joined: 23 Feb 2004 Posts: 51
|
|
Posted: Wed May 18, 2005 5:03 pm |
|
|
That worked PERFECTLY -- setting to "Erase as Needed".
Thank you very, very much,
Robert |
|
|
|