I'm a bit confused as to whether I should use EEPROM or FLASH memory for storing "constants". The 18F452 data sheet says some things that I don't really understand. Section 6.8 says: " The data EEPOM is a high endurance byte-addressable array that has been optimized for the storage of frequently changing information (.e.g. program variables or other data that are updated often). Frequently changing values will typically be updated more often that specification D124. { This is the # of EEPROM write cycles before a refresh is required.} If this is not the case, an array refresh must be performed. For this reason, variables that change infrequently (such as constants, IDs, calibration, etc.) should be stored in FLASH program memory." Then it says in a note: "If data EEPROM is only used to store constants and/or data that changes rarely, an array refresh is likely not required" This suggests to me that if I need to write to the EEPROM more than the D124 limit (e.g. 1 million cycles - think this means per cell), I can do so provided that I do a refresh of the EEPROM before the D124 limit. Is this correct? Now it also suggests that infrequently changing data should be stored in FLASH rather than EEPROM if refresh is going to be needed. I gather that if I'm not going to write often enough to have to do a refresh that I can store calibration data, etc in EEPROM along with "changing" data. OK. Here is what I'm trying to do. I've a program that writes checkpoint data to EEPROM every few minutes, and uses different blocks of EEPROM each time to maximize the number of times I can write. I figure I can run the program for about 4 years before reaching the minimum 1 million cycle limit. I also want the user to be able to enter some setup data (calibration data, for example) and save it - this would typically only be done one or twice over the same 4 years. It SEEMS from the data sheet that in this instance I can safely store my calibration data in EEPROM. Is this correct? A question about refresh. The refresh routine they show appears to read then rewrite each EEPROM cell with the same data. If my app was going to exceed the D124 spec, can I just do a refresh every D124 (e.g. 1 million) cycles, thus essentially having EEPROM with unlimited endurance? If refresh indeed refreshes EEPROM, why the suggestion not to use it for infrequently changing data? Any insight anyone can offer will be greatly appreciated. Thanks Larry Bradley Orleans (Ottawa), Ontario, CANADA -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body