Shop OBEX P1 Docs P2 Docs Learn Events
BS2 - can I save variables, even after reset? — Parallax Forums

BS2 - can I save variables, even after reset?

evergreenevergreen Posts: 43
edited 2009-11-30 23:55 in BASIC Stamp
Does the BS2 have the capabilities to save variables to non-volatile (I think that's the word.. like memory that does not depend if there's power or not)? Or would I need an external EEPROM?

Thanks,
Matt

Comments

  • Mike2545Mike2545 Posts: 433
    edited 2009-11-30 20:39
    Use the Write and Read commands to store/retrieve variables in the internal eeprom

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike2545

    This message sent to you on 100% recycled electrons.
  • evergreenevergreen Posts: 43
    edited 2009-11-30 22:43
    Okay, and I've read that downloading a new program only erases the necessary memory locations to fit the new program. Is there a way to tell the system to wipe everything before downloading the new program?

    Thanks,
    Matt
  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-30 23:55
    No

    If you include a DATA statement in your program (read the chapter in the BASIC Stamp Syntax and Reference Manual), the DATA statement will initialize the portion of the EEPROM that it occupies when the program is downloaded. The first DATA statement in a program starts at location zero in the EEPROM.
Sign In or Register to comment.