Guidance on writing to the EEPROM

Hi, I saw this on a very old post.

I suggest to go ahead and use that technique. Why should there be a problem?

EEPROM stands for Eletricaly Erasable PrOgram Memory. I don't know exaactly what type of EEPROM You use so I guess that Your EEPROM reads all 0xFF when it is erased. You can write zeroes but You can't write a "1" into a bit that is zero.
Why do You think EEPROMs have a special erase procedure?

Railroader:
EEPROM stands for Eletricaly Erasable PrOgram Memory.

Or more usually "Electrically Erasable Programmable Read-Only Memory"

If the EEPROM is full, you erase the entire thing and start over.

Reading Your post again I admit You've got something that could work. Just keep in mind that You are not tresspassing into already used memory. When no free memory is available, erasing will most likely erase the entire memory. Some EEPROMs can be erased in pages, but how is Your EEPROM arranged?
Using an EEPROM for only one set of data.... Why not adding an SD memory that accepts ovwerwriting??

here is a similar topic i started from a few days ago. i wrote a couple very basic functions that are working well for me to save to different spots on the eeprom. the only difference from my code and what you are desrcibing is that my code has an adjustable size so you can save an array of bytes. someone also posted a couple links to more official algorithyms here as well.

check out this topic and the code i wrote

https://forum.arduino.cc/index.php?topic=627380.msg4249055#msg4249055

Hi,
@anon92377603 have you tried some of the EEPROM examples in the Arduino IDE?
eepromexamples.jpg

Might be time to "do" rather than keep "thinking".
Tom... :slight_smile:

eepromexamples.jpg

What is the desired frequency of those writings? Not knowing exactly I guess the number of writings quaranted is somwhere in the area of 10 000. Correct me, You who have the specs fresh in mind.

Railroader:
What is the desired frequency of those writings?

I guess with a power cut. Who knows how frequent that will be.

It's always wise to look at the history of posters have less than 100 posts.
Then you would have seen that this tread is a continuation of this one.
Another example that cross-posting wastes time.
Leo..