Pages: [1]   Go Down
Author Topic: Question abour EEPROM.write()  (Read 527 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 1
Posts: 415
MEGA_Stick_II is here
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?


Logged

0
Offline Offline
Faraday Member
**
Karma: 7
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

-j

Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 731
skcor oniudrA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 731
skcor oniudrA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's the post, spiffed did the testing - ignore the thread title he was testing EEPROM = )

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1214379954/21#21

« Last Edit: November 23, 2008, 07:33:09 pm by John_Ryan » Logged

0
Offline Offline
Sr. Member
****
Karma: 1
Posts: 415
MEGA_Stick_II is here
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 731
skcor oniudrA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Pages: [1]   Go Up
Jump to: