Go Down

Topic: EEprom write example program. (Read 1 time) previous topic - next topic

Simpson_Jr

Feb 28, 2010, 01:35 pm Last Edit: Feb 28, 2010, 03:40 pm by Simpson_Jr Reason: 1
Hi,

I'm an absolute Arduino-newbie, just received the board 4 days ago.  I'm having great fun merging example programs into new programs and scoring usable parts from old PCs. :)

I was wondering about the EEprom write example program. In countless datasheets I read about the amount of times it's possible to re-write an EEprom. Often... a number like 100.000 is mentioned.

The EEprom-write example however seems to be stuck in a loop doing just 3 things, read a result from an analog port, write it to eeprom and wait for 100 Milliseconds. So, in one hour about 36000 samples are taken/written.

Suppose I had this program running, forgot to turn the power off and went to bed, the Eeprom would be written about 300.000+ times by the time I wake up (and a lot more in weekends :)). Wouldn't that be a serious threat to the life-expectancy of my 328 ?

Sofar I haven't worked with EEproms and I don't know whether my reasoning is correct. Could anyone enlighten me before I do something irreversibly stupid ?

Thanks in advance, best wishes,

Bart.

--Edit

As far as I understand now... each cell/byte of the eeprom could be written a number of times. The example program increments its counter until it reaches the value 512 before it is reset.

That would reduce my fear of demolishing half the eeprom of my 328 quickly by 512 as well.

Still, I just bought it, one day i might accidentally forget to program a delay or make another mistake and i may accidentally end up writing the eeprom continuously at full speed.

So, how fragile... is EEprom


Coding Badly

Quote
Wouldn't that be a serious threat to the life-expectancy of my 328 ?

Only the EEPROM would be "threatened".  And, from an experiment performed by an AVR Freak, the "threat" is minor.


Quote
Could anyone enlighten me before I do something irreversibly stupid ?

If you do wear out an EEPROM cell, it won't affect the rest of the processor.  If you want a fully functional EEPROM, the processor can be replaced for few dollars.


Quote
As far as I understand now... each cell/byte of the eeprom could be written a number of times. The example program increments its counter until it reaches the value 512 before it is reset.

The phrase "wear leveling" is used to describe the technique.


Quote
So, how fragile... is EEprom

Not very.

Go Up