Shop OBEX P1 Docs P2 Docs Learn Events
Erase EEPROM — Parallax Forums

Erase EEPROM

SailerManSailerMan Posts: 337
edited 2006-09-28 13:56 in Propeller 1
I am 1 day into learning the Propeller... I used F-11 and programmed the EEPROM... now I want to erase it without having to put another program in.

Is it possible?

Comments

  • simonlsimonl Posts: 866
    edited 2006-09-26 17:08
    I guess it would be possible to write a short utility, download that with F10 (to RAM), and it's only job is to write $00 to all locations in the EEPROM -- but I don't know how. Someone's bound to be able to do it though...

    Why would you want to do that thought?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
  • Mike GreenMike Green Posts: 23,101
    edited 2006-09-26 17:17
    You can write a short program using the i2cObject from the Propeller Object Exchange to write zeroes to the EEPROM and download it to RAM as Simon mentioned. Do be careful in debugging your utility program in that EEPROMs have only a limited lifetime. You can only write to the same location (or locations) somewhere on the order of 100000 times before that location won't work anymore. It seems like a lot, but you can easily go through that in a few hours with a buggy program that writes to the same location over and over again.
  • SailerManSailerMan Posts: 337
    edited 2006-09-26 18:50
    Ok thanks. [noparse]:)[/noparse]

    I wanted to know for no particular reason... I just didn't see a facility to do so.

    ·
  • Beau SchwabeBeau Schwabe Posts: 6,547
    edited 2006-09-26 20:28
    SailerMan,

    If you just want to erase what you programmed with F11, just write a one line program in a New File window (File-->New)· or Ctrl-N

    Type:

    [b]PUB[/b] Nothing
    

    ...and hit F11 again.

    If you want to just test code and don't want to load it into EEPROM, use F10 instead.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-09-27 17:43
    For those familiar with the BASIC Stamps, Beau’s suggestion is akin to the following code to erase a BASIC Stamp program;
    ·
    END

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • SailerManSailerMan Posts: 337
    edited 2006-09-28 11:48
    Good Tip!

    When you load even a short program does it completely·write over all bytes of the ERPROM?

    ·
  • Mike GreenMike Green Posts: 23,101
    edited 2006-09-28 13:56
    When the Propeller copies a program from RAM to EEPROM, it writes zeroes from the end of the program to the end of the EEPROM.
Sign In or Register to comment.