I\'m working on an Arduino library that will maximize the life of the AVR\'s EEPROM. It takes the number of variables you want to store and does the rest. This is my attempt, wh
I suggest you use a simple "dirty" bit on your data elements instead of counters. Unless scanning for the last written element is too slow, or you want to do something complex like keeping track of bad EEPROM cells, there's no point in having counters and catalogs.
The algorithm is very simple: set a "dirty" bit in every element you write, and scan for this bit when you need to read the last element or write a new one. When you run out of clean spots, either erase all elements or (in case of Arduino) just flip the value of the "dirty" bit and start from the beginning. I have written a detailed explanation here, if you need one.