Go Down

Topic: Question abour EEPROM.write() (Read 1 time) previous topic - next topic


The Arduino specs a 100,000 write/erase cycle, is this per address or total?

What I am wondering if I can write to an address, read what was just written and check it to see if the byte matches, if not then assume that address dead and move to the next address to write the data. Effectivly giveing me 100,000*512=51,200,000 write cycles.

Is there other ways to preserve data in case of power loss?

Can the Arduino write to a SD card? Found some post on this and reading them now, anything more improved?


I think that number is per address.  Not sure what the failure modes are, so the test you mention may not be a good one (e.g., failure mode may be that the value is there for a few minutes, or hours, etc).

SD has an SPI interface mode, so you can use an SD card as an SPI flash device.  This acts like a chunk of flash, no FAT filesystem and pop it in a computer type support unless you write it.

There are also external flash devices from various manufacturers.

If you're worried about device failure due to excessive write cycles, check out the Ramtron FRAM devices.  Their claim is more than 1014 write cycles.  At a glance price is comparable to other flash devices.  I'm currently looking at them because of the speed and instant writes - no need to wait between writes.



I just finished writing a simple FAT for EEPROM after reading the results of a test done by another member here, can't remember names sorry.

The tester got up to 3.2 million writes at one address - and the test only stopped after power ran out.

So the thought was, the specification 100,000 (per address) is at the extreme low end.

If you search EEPROM from the front page you'll probably find the results of the test.


Nov 24, 2008, 01:32 am Last Edit: Nov 24, 2008, 01:33 am by John_Ryan Reason: 1
Here's the post, spiffed did the testing - ignore the thread title he was testing EEPROM = )



Thanks all for the info.
I did some calculations and not sure if I even need to worry about it.

Even if I needed to write 10 times a day, that is 3650 times per year so 100,000/3650 = 27 years!

Basicly what I need to do is write the data only if power is lost, and only if different from what has previously been writen. Which brings me to another questions, what can you sggest to use as "power backup" that will provide enough power to give time for the write?
I figure I can use a digi input to detect main power lose, when the pin goes low - write the data. So I would need a cap or something to provide enough power. Somthing like the battery on a mainboard comes to mind.


The UPS, I think, is also explained at the bottom of the same post, eg, pin, capacitor and diode arrangement.

Go Up