I was wondering if anyone has experience with EEPROM endurence on Atmel AVR parts. I have a controller project that requires a real-time clock that I originally planned to implement via a DS1320+supercap. However, I recently found a prebuilt board that does 90% of what I want but does not include a battery/cap backup RTC.
I can use one of the AVR timers to generate an accurate clock while it has power. The question is what to do about power failures. My thought was that at midnight I would write the current date to EEPROM and then once per minute I would write one byte of EEPROM data that essentially indicated the current minute.
Whenever the part gets powered up, I can read the current date from EEPROM and then count the number of "minute flags" to calc the time. Obviously this scheme "leaks" time when power is unavailable but that is acceptable for my application (because the part also knows that power was lost and can operate with that slightly skewed time until an operator corrects it).
EEPROM endurance for the ATMEGA128 is listed at 100K erase/write cycles. The scheme outlined above uses approximately 4+1440 bytes with each byte being written once per day. So the question is whether the 100K endurance applies at the per-byte level or overall. The answer obviously represents a thousand fold difference in performance with the part lasting either two months or 250+ years.
I could not find any good documentation from Atmel with a precise definition of endurance. I did find an article from Microchip that mentioned that EEPROM byte writes tend to be harder on parts than page/bulk due to current issues related to the internal charge pump used to write the EEPROM.
Anyone know enough about these parts to offer some guidance? Thanks.
-- Greg Schaefer (teamvraz@com_REM0VE_cast.net)