View Full Version : Questions about The Write Command
01-10-2006, 04:25 AM
Reference: I am using The Basic Stamp 2P40 pin Stamps
I have some concern about the write command, this is what the help file says
The EEPROM can only accept a finite number of write cycles per location before it wears out. The table above indicates the guaranteed number of writes before failure.
1. Will I have to replace the Basic Stamp when this failure occurs?
2. What exactly is a failure?
3. Is their anyway to fix this after it happens? For example a Low Level Format utility for the Stamp, "similar to that of a hard drive"
This is an area of concern for me, because the stamps will be used in an industrial application and I cannot afford to be replacing stamps. Is there another Non Volitle way to write to EEPROM without the stamp wearing out?
01-10-2006, 04:36 AM
·· Writing to the EEPROM constantly in a loop as if it were RAM can cause failure pretty quickly.· Normally this wouldn't happen.· Things that are constantly being updated should be kept in RAM.· Settings and long term storage can be written to the EEPROM.· For example, data logging.· The thing is, you don't want to write to the same location repeatedly.
Parallax Tech Support
01-10-2006, 04:38 AM
Theres nothing different about the EEPROM used in the Stamp compared to other products. All EEPROMS have the same concern. If you know you'll need non-volatile storage for very many write cycles, you'll have to consider some flash memory or battery backed RAM, both of which will work fine with the Stamps.
If you give a few more details of the application, I'm sure you'll get some helpful responses.
01-10-2006, 05:55 AM
Each location in the EEPROM can be written to a limited number of times -- for example, one million writes.
When it 'fails', what happens is if you read back what you thought you just wrote, the two values won't match.
Yes, replacing the BS2 is the only way to fix this, unless you're REALLY good with surface-mount soldering equipment.
The best way around this is to purchase a dinky 8-pin SPI interfaced eeprom, and use SHIFTIN/SHIFTOUT to communicate with it. Then, when THIS wears out, you install another dinky 8-pin eeprom.
If you wrote to the EEPROM once every hour, it would take a long time to wear it out -- like 114.15 YEARS (if my math is right).
If you write to the EEPROM once every millisecond, it will wear out in about 16.67 hours. So don't do that.
I don't know a lot about eeprom physics, but I believe the 'wear out' cycle involves destruction of the memory gate. Thus there's no 'low-level format' that could save you. True, if you're writing to the last location all the time, you could just write to the (last location - 1) until that wears out. The BS2 IDE won't complain unless you wear out a location it's actually trying to program.
Again, the best solution is an external eeprom -- 25L640 is SPI (SHIFTIN/SHIFTOUT) I think.
01-10-2006, 07:02 AM
Paul Baker has often posted of "FRAM", which has the 1 trillion R/W cycles, much more than most any EEPROM.· I believe they're available from newark.com (search this site for FRAM, it'll bounce back lots of posts/references.)
Post Edited (PJ Allen) : 1/9/2006 11:09:47 PM GMT