Pages: [1]   Go Down
Author Topic: number of EEPROM write cycles  (Read 2578 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,
the EEPROM has a guaranteed life of 100.000 write cycles, as written in the ATmega168 datasheet.
I wanted to know, what the "real" lifetime is, because i use it for a counter in a project.
Therefore a have written a short sketch that increments a 24 bit counter and write it every time
to the EEPROM. Afterwards it is read and compared. This sketch runs until the read value is different
from the written one.
The Sketch is still running (it takes approx. 10 ms to write 3 bytes, so i can only increment 100 times per second)...
And currently it has done 5.6 Million cycles without error!!!!!!
Isn't that interesting???
Regards,
Bernhard
Logged

Wuppertal/Germany
Offline Offline
God Member
*****
Karma: 1
Posts: 895
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
its just statistics..

Your harddisk will probably have a mean time before failure of 5 years, but ....
it could also happen hapjgtu45gtvö4j right 786r1i3z4hcigew now  !57%&bgBjhbg%675rfu78 :o

Eberhard
Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I agree with Eberhard that a test sample of one chip does not indicate that all chips will achieve similar results.

Also, the results may not be conclusive because it is possible that data read immediately after write may verify ok but on an overused chip the written data could decay over time.  I don't know if this happens with the flash used in the arduino chip, it may be worth testing if after all those cycles, data values written remain stable over long periods of time.

But if data stored in EEPROM is in any way critical to an application then IMHO one should stick within the manufactures guidelines.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There's a way more elegant solution to your counter storage problem, and the ATmega chips have (nearly) all components on board to implement it. Instead of storing the counter in EERPOM memory every time the counter value changes, keep it in RAM instead. Use a monitoring circuit (e.g. analog comparator + voltage reference of the ATmega) to detect a power failure/dip early on. Then, and only then, write the value to EEPROM. Such an approach should keep you from having to perform statistically relevant EEPROM endurance tests.
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 267
dinosaur cork
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Another approach would be to use "load leveling" i.e, writing to a different memory slot each time, I think the EEPROM write limits (it's only a specified limit and SHOULD be substantially greater) only apply to the actual slot written too.

paul
Logged

Pages: [1]   Go Up
Jump to: