Shop OBEX P1 Docs P2 Docs Learn Events
Erasing eeprom — Parallax Forums

Erasing eeprom

ArchiverArchiver Posts: 46,084
edited 2001-07-15 06:34 in General Discussion
Ricky-

Depends. If the variable "loop" is a byte variable, it will only
erase 0 to 255 (since a byte variable's value cannot exceed 255).
If it's a word variable, it ought to clear 0 to 482.


Regards,

Steve

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-07-13 20:37
    Should this code erase, or set to zero, memory locations 0 to 482 on a bs2p?

    For loop 0 to 482
    write loop,0
    pause 10
    next



    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-13 20:43
    loop = I mean
    Original Message
    From: Ricky Konvicka <ricky@m...>
    To: <basicstamps@yahoogroups.com>
    Sent: Friday, July 13, 2001 2:37 PM
    Subject: [noparse][[/noparse]basicstamps] Erasing eeprom


    > Should this code erase, or set to zero, memory locations 0 to 482 on a
    bs2p?
    >
    > For loop 0 to 482
    > write loop,0
    > pause 10
    > next
    >
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-14 03:26
    > > Should this code erase, or set to zero, memory locations 0 to 482 on a
    >bs2p?
    > >
    > > For loop = 0 to 482
    > > write loop,0
    > > pause 10
    > > next

    Ricky,

    Yes, that should work fine, if by "erase" you mean set all of those
    bytes to zero. Sometimes $ff is used for the "erased" state.

    This works in the current bank. To erase data in a different bank,
    preface the routine with the STORE n command, where n is 0 to 7 for
    the bank number.

    -- regards,
    Tracy Allen
    electronically monitored ecosystems
    mailto:tracy@e...
    http://www.emesystems.com
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-14 18:09
    Tracy -

    Are you making a general statement or speaking of the
    Stamp in particular? As a C++ guy by training, I
    understand the importance of not assuming that a
    declared variable will start at 0 without formal
    assignment, but I am very dependent on the assumption
    that virgin Stamp EEPROM is 0.

    Bob Pence

    --- Tracy Allen <tracy@e...> wrote:
    > > > Should this code erase, or set to zero, memory
    > locations 0 to 482 on a
    > >bs2p?
    > > >
    > > > For loop = 0 to 482
    > > > write loop,0
    > > > pause 10
    > > > next
    >
    > Ricky,
    >
    > Yes, that should work fine, if by "erase" you mean
    > set all of those
    > bytes to zero. Sometimes $ff is used for the
    > "erased" state.
    >
    > This works in the current bank. To erase data in a
    > different bank,
    > preface the routine with the STORE n command, where
    > n is 0 to 7 for
    > the bank number.
    >
    > -- regards,
    > Tracy Allen
    > electronically monitored ecosystems
    > mailto:tracy@e...
    > http://www.emesystems.com
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed.
    > Text in the Subject and Body of the message will be
    > ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >


    __________________________________________________
    Do You Yahoo!?
    Get personalized email addresses from Yahoo! Mail
    http://personal.mail.yahoo.com/
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-14 19:15
    wouldnt it take only 3 or 4 lines of code to write a zero to all locations ?


    richard


    Original Message
    From: "Pence Bob" <bobpence_2000@y...>
    To: <basicstamps@yahoogroups.com>
    Sent: Saturday, July 14, 2001 12:09 PM
    Subject: Re: [noparse][[/noparse]basicstamps] Erasing eeprom


    > Tracy -
    >
    > Are you making a general statement or speaking of the
    > Stamp in particular? As a C++ guy by training, I
    > understand the importance of not assuming that a
    > declared variable will start at 0 without formal
    > assignment, but I am very dependent on the assumption
    > that virgin Stamp EEPROM is 0.
    >
    > Bob Pence
    >
    > --- Tracy Allen <tracy@e...> wrote:
    > > > > Should this code erase, or set to zero, memory
    > > locations 0 to 482 on a
    > > >bs2p?
    > > > >
    > > > > For loop = 0 to 482
    > > > > write loop,0
    > > > > pause 10
    > > > > next
    > >
    > > Ricky,
    > >
    > > Yes, that should work fine, if by "erase" you mean
    > > set all of those
    > > bytes to zero. Sometimes $ff is used for the
    > > "erased" state.
    > >
    > > This works in the current bank. To erase data in a
    > > different bank,
    > > preface the routine with the STORE n command, where
    > > n is 0 to 7 for
    > > the bank number.
    > >
    > > -- regards,
    > > Tracy Allen
    > > electronically monitored ecosystems
    > > mailto:tracy@e...
    > > http://www.emesystems.com
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed.
    > > Text in the Subject and Body of the message will be
    > > ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > >
    > >
    >
    >
    > __________________________________________________
    > Do You Yahoo!?
    > Get personalized email addresses from Yahoo! Mail
    > http://personal.mail.yahoo.com/
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-15 06:34
    Here's another point of view. Depending on the memory technology, a '1'
    can be the cleared/erased state. To write to the typical Flash Memory
    device, it is first "erased" to read all '1's, next any bit that is
    supposed to be a '0', is cleared.

    If you wanted to erase a Flash device, it would wear a device less, if you
    erased it to all '1's. Not up to speed on EEPROM implementation. That
    class was way too long ago.

    Joshua

    --On Saturday, July 14, 2001 1:15 PM -0500 Richard Friedrich
    <rfriedrich@a...> wrote:

    > wouldnt it take only 3 or 4 lines of code to write a zero to all
    > locations ?
    >
    >
    > richard
    >
    >
    >
    Original Message
    > From: "Pence Bob" <bobpence_2000@y...>
    > To: <basicstamps@yahoogroups.com>
    > Sent: Saturday, July 14, 2001 12:09 PM
    > Subject: Re: [noparse][[/noparse]basicstamps] Erasing eeprom
    >
    >
    >> Tracy -
    >>
    >> Are you making a general statement or speaking of the
    >> Stamp in particular? As a C++ guy by training, I
    >> understand the importance of not assuming that a
    >> declared variable will start at 0 without formal
    >> assignment, but I am very dependent on the assumption
    >> that virgin Stamp EEPROM is 0.
    >>
    >> Bob Pence
    >>
    >> --- Tracy Allen <tracy@e...> wrote:
    >> > > > Should this code erase, or set to zero, memory
    >> > locations 0 to 482 on a
    >> > > bs2p?
    >> > > >
    >> > > > For loop = 0 to 482
    >> > > > write loop,0
    >> > > > pause 10
    >> > > > next
    >> >
    >> > Ricky,
    >> >
    >> > Yes, that should work fine, if by "erase" you mean
    >> > set all of those
    >> > bytes to zero. Sometimes $ff is used for the
    >> > "erased" state.
    >> >
    >> > This works in the current bank. To erase data in a
    >> > different bank,
    >> > preface the routine with the STORE n command, where
    >> > n is 0 to 7 for
    >> > the bank number.
    >> >
    >> > -- regards,
    >> > Tracy Allen
    >> > electronically monitored ecosystems
    >> > mailto:tracy@e...
    >> > http://www.emesystems.com
    >> >
    >> >
    >> > To UNSUBSCRIBE, just send mail to:
    >> > basicstamps-unsubscribe@yahoogroups.com
    >> > from the same email address that you subscribed.
    >> > Text in the Subject and Body of the message will be
    >> > ignored.
    >> >
    >> >
    >> > Your use of Yahoo! Groups is subject to
    >> > http://docs.yahoo.com/info/terms/
    >> >
    >> >
    >>
    >>
    >> __________________________________________________
    >> Do You Yahoo!?
    >> Get personalized email addresses from Yahoo! Mail
    >> http://personal.mail.yahoo.com/
    >>
    >> To UNSUBSCRIBE, just send mail to:
    >> basicstamps-unsubscribe@yahoogroups.com
    >> from the same email address that you subscribed. Text in the Subject and
    > Body of the message will be ignored.
    >>
    >>
    >> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >>
    >>
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    > Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
Sign In or Register to comment.