Shop OBEX P1 Docs P2 Docs Learn Events
Questions about The Write Command — Parallax Forums

Questions about The Write Command

Lucas HarlemLucas Harlem Posts: 5
edited 2006-01-09 23:02 in BASIC Stamp
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?

Thanks

Lucas Harlem

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-09 20:36
    Lucas,

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

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • stamptrolstamptrol Posts: 1,731
    edited 2006-01-09 20:38
    Lucas,

    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.

    Regards,
    Tom
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-01-09 21:55
    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.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-01-09 23:02
    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.)

    http://www.ramtron.com/doc/AboutFRAM/overview.asp

    http://www.ramtron.com/lib/literature/datasheets/FM24C16Ads_r3.0.pdf




    Post Edited (PJ Allen) : 1/9/2006 11:09:47 PM GMT
Sign In or Register to comment.