Pages: [1] 2   Go Down
Author Topic: EEPROM ?  (Read 757 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I have a basic question about EEPROM. It says in the reference tab of the arduino site "An EEPROM write takes 3.3 ms to complete. The EEPROM memory has a specified life of 100,000 write/erase cycles, so you may need to be careful about how often you write to it." can someone tell me what this means? does it mean that i can only write it 100, 000 times and then i have to replace my arduio chip or i can't write to it anymore? i am using the arduino uno chip.
Logged

France
Offline Offline
God Member
*****
Karma: 34
Posts: 973
Scientia potentia est.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes I think if you write +/- 100000 times to the same place then it will start to fail reading from / writing to that place.
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6106
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Just to be clear.

The EEPROM referred to on that page is for the program-accessible EEPROM.  That is so your sketch can store data when power is lost.

That information does not refer to the Flash memory used to store the program code.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 142
Posts: 5275
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just to be clear.

The EEPROM referred to on that page is for the program-accessible EEPROM.  That is so your sketch can store data when power is lost.

That information does not refer to the Flash memory used to store the program code.

The flash memory only has a tenth of the endurance of the EEPROM...
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Worst state in America
Offline Offline
God Member
*****
Karma: 32
Posts: 792
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


I have a basic question about EEPROM. It says in the reference tab of the arduino site "An EEPROM write takes 3.3 ms to complete. The EEPROM memory has a specified life of 100,000 write/erase cycles, so you may need to be careful about how often you write to it." can someone tell me what this means? does it mean that i can only write it 100, 000 times and then i have to replace my arduio chip or i can't write to it anymore? i am using the arduino uno chip.

Imagine a FET (field effect transistor). Apply a charge to the gate and the FET conducts.

Now, imagine a memory cell (one bit) consisting of a FET, but no direct connection to the gate (there is an insulator layer between the gate terminal and the junction itself).

So, applying a "normal" charge to the gate terminal will do nothing because it's blocked by an insulator.

But, put a higher voltage (say 12, 15 even 21 volts) on that gate and a charge (electrons) will "tunnel" through the insulator and fill up the region between the FET junction and the gate.

Now the FET is conducting. Remove the "high" voltage and the charge stays trapped. The FET always conducts.

You have just programmed one EEPROM cell from logical 1 to logical 0.

The chip can run on 3.3 volts or 5.0 volts and self program because it has a built in CHARGE PUMP that generates the high programming voltage.

Now imagine a large array of these FETS... says 16384 of them (a 128 x 128 matrix). You now have a 2K by 8 bit memory matrix.

To change the programming of the EEPROM, the charge in each cell you wish to change must be removed, (making that byte all 0xFF), then program the appropriate zeros to store the new pattern.

To erase the floating gate, you need either to expose the chip to ionizing radiation (a short wave UV lamp) - (EPROM), or apply a "high" opposite charge to the cell to "draw out" the stored electrons (making the FET stop conduction). This is an EEPROM (EE=Electrically Erasable). Then a new pattern of zeros can be programmed in.

The problem is, forcing electrons back and forth through the insulating layer gradually damages it at the atomic level. It's insulation qualities deteriorate and eventually (after, say, 100,000 cycles) the insulator "leaks" enough that a programmed zero drains out and returns the cell to a logic one. At this point the EEPROM is ruined (won't hold data anymore). The data literally "leaks out" and the chip eventually returns to all 0xFF.

Hope this answers your question.

Logged

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

0
Offline Offline
Faraday Member
**
Karma: 23
Posts: 3469
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have also covered this issue in my blog together with some rudimentary wear leveling code: http://blog.blinkenlight.net/experiments/counting-resets/wear-leveling/.
Logged

Check out my experiments http://blog.blinkenlight.net

Worst state in America
Offline Offline
God Member
*****
Karma: 32
Posts: 792
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have also covered this issue in my blog together with some rudimentary wear leveling code: http://blog.blinkenlight.net/experiments/counting-resets/wear-leveling/.

Well, I thought that it would be good to present the info in an easy to understand form. Too many times a student is drowned in arcane mathematics and unexplained things like "Fowler-Nordheim electron tunneling" and comes away from the lesson with nothing but a headache.

Way too many "teachers" and professors know the material, but are awful TEACHERS. A good TEACHER does whatever it takes to get the idea UNDERSTOOD by the student.

I like to teach in a way that is easy to understand, then when the basic idea is understood, THEN present the math and "higher level" facts that go along with it.

I didn't mention wear leveling simply because I didn't want to over-complicate what I wrote. New concepts are hard enough for some to grasp without making it even more confusing.

AFTER the student grasps the idea of trapped charges and the deterioration of the gate insulator, THEN the need for wear leveling can be introduced.


On another note... I once had an OTP (one time programmable) 68HC11 MCU that I screwed up (burned the wrong code into). So I figured I would test the EEPROM to destruction and wrote a little loop that just kept writing 0x55 and 0xAA to each byte, then switching the pattern (with a full erase after each write).

After running for WEEKS straight and many tens of millions of cycles, the EEPROM was still good!

I don't know if the EEPROM was damaged (and may have leaked away in a few days or weeks), but the programming time for a byte never changed and there was never a read-back error.

I think manufacturers are way conservative when they publish EEPROM cell write life numbers......
Logged

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 512
Posts: 26202
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If its really a concern, adding an external FRAM can provide a lot more nonvolatile storage space, is fast to write to like an SRAM, has EEPROM dataholding capability, and "High Endurance 100 Trillion (1014) Read/Writes"!
http://www.mouser.com/ProductDetail/Ramtron/FM25W256-G/?qs=sGAEpiMZZMtsPi73Z94q0IidxlBy6KhxDctIlbo1eg0%3d

Can operate fom 5V also, not just 3.3V.
http://www.ramtron.com/files/datasheets/FM25W256_ds.pdf
« Last Edit: November 22, 2012, 09:45:25 pm by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Amazing, 256kb of fast and long lasting non-volatile memory! It is the first time I hear about FRAM (or FeRAM) and I am very impressed!

Is there an FRAM shield commercially available? and if not why do we not see such products offered?
Logged

0
Offline Offline
Faraday Member
**
Karma: 23
Posts: 3469
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
On another note... I once had an OTP (one time programmable) 68HC11 MCU that I screwed up (burned the wrong code into). So I figured I would test the EEPROM to destruction and wrote a little loop that just kept writing 0x55 and 0xAA to each byte, then switching the pattern (with a full erase after each write).

After running for WEEKS straight and many tens of millions of cycles, the EEPROM was still good!

I don't know if the EEPROM was damaged (and may have leaked away in a few days or weeks), but the programming time for a byte never changed and there was never a read-back error.

Obviously you did not read my blog. Otherwise you would know that your experiment was pointless. EEPROM damage shows up in decreased retention time. Typically a cell is considered damaged if the threshhold (usually something in the range of years) can not be guaranteed anymore. You tested for retention times in the seconds / minutes range. This does not provide any insights whatsoever into remaining retention capabilities.
Logged

Check out my experiments http://blog.blinkenlight.net

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 142
Posts: 5275
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think manufacturers are way conservative when they publish EEPROM cell write life numbers......

I've worn an arduino EEPROM out.

I made a battery tester that discharged batteries and timed them. It constantly wrote the time to EEPROM so I could fiddle with the software and upload new versions without the Arduino forgetting how long the current battery had been discharging.

I forgot to take the EEPROM code out when it was finished the battery tester sat on my bench for a couple of months and I'd stick batteries in it every now and again to see what sort of shape they were in.

And about six months later I re-used the Arduino. I was trying to use the EEPROM and failing. It took me all afternoon to figure out I'd wrecked the EEPROM with my battery tester. Luckily it was only the first six bytes, the rest was OK.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 512
Posts: 26202
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

FRAM shield - here's one I started, got tied up and haven't actually routed it yet.
Want to replace the shift register with an open drain part for 3.3V operation,
and surface mount Rs & Cs.
Guess I need to change the packages to SMD also, since the parts are not available as DIPs.


* fram_shield_layout.png (19.28 KB, 581x758 - viewed 6 times.)

* fram_shield_sch.png (25.69 KB, 1337x675 - viewed 9 times.)
« Last Edit: November 23, 2012, 01:36:52 pm by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

FRAM and Due compatible! Great shield, hope you find the time to finish it!

If FRAM is indeed as good as it sounds, I hope we start using it instead of EEPROM before long.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 512
Posts: 26202
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

TI has some uPs with FRAM. They sent out a booklet on using it recently.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Worst state in America
Offline Offline
God Member
*****
Karma: 32
Posts: 792
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

FRAM shield - here's one I started, got tied up and haven't actually routed it yet.
Want to replace the shift register with an open drain part for 3.3V operation,
and surface mount Rs & Cs.
Guess I need to change the packages to SMD also, since the parts are not available as DIPs.

I've used parallel FRAM devices (RAMTRON FM1808) in 68HC11 controller projects. They are great. Completely non-volatile, low power, SRAM write speed and never wear out.

Solid state disk drives would be the ultimate use for FRAM if they weren't so large (silicon-wise) and so expensive relative to flash.

BTW, what do you need the shift register for?  There are serial FRAM chips you know.... http://www.ramtron.com/products/nonvolatile-memory/serial.aspx
Logged

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Pages: [1] 2   Go Up
Jump to: