Computing stuff tied to the physical world

Destruction!

In AVR, Hardware on May 11, 2011 at 00:01

No, not distractions

Had a ATmega168 chip lying around which isn’t going to be used anymore anyway, so why not do some destructive testing on it, eh?

There have been a couple of such tests floating around on the web, so I thought I’d try to replicate them – to try and find out how many read-write cycles the internal ATmega’s EEPROM can sustain. I started from the info on John Boxall’s weblog, and set up a similar configuration, but based on a JeeNode:

Dsc 2497

Note that this isn’t using the LCD Plug, but has direct connections to 6 digital output pins (I used the same pins as in the original sketch: digital 4..9).

Made a simpler sketch to just toggle bits in the EEPROM and display the counter (the display is fast when there’s no I2C expander chip involved):

Screen Shot 2011 05 10 at 18.46.38

It turns out that flipping all the bits in the EEPROM takes a few seconds, and with an expected lifetime well over 100,000 that test would have lasted several days. So instead, I rigged the test to only flip byte 0 in the EEPROM. Let’s see how much beating that single byte can take!

Several hours later…

Dsc 2499

Over 3,260,000 write cycles and still going.

Note that this is only testing EEPROM address 0x000, and that the check is right after the write, so this is not necessarily a very useful test: bad bytes might hold charge, but not for over 20 years as listed in the specs, and some other address might give an error much sooner.

But still… 32x above spec so far. Not bad!

Update – The ATmega168 finally broke down:

Dsc 2502

Then it failed 6200 cycles after the next power-on.

  1. It’s good to know given the amount of “compile, upload, test, D’oh!” I have been doing over the past year!

    If you really want to destroy it then deploy my favourite secure data destroying household device – the microwave oven :-D

    That will require a video.

    • Oh hang on, this is the 512 byte storage EEPROM , not sketch storage EEPROM… Are they the same spec?

      I think maybe you should test that one too :-)

  2. The expected life time will be for a certain number of bytes to die and as there are quite a few on there it’s the average that is the problem. Also I believe EEPROM is written in blocks and once one bit goes the whole block becomes useless. (Warning: I haven’t checked any of this it’s just stuff I think I remember reading a while ago)

Comments are closed.