Shop OBEX P1 Docs P2 Docs Learn Events
Clearing program from BASIC Stamp? — Parallax Forums

Clearing program from BASIC Stamp?

jeffrey morrisjeffrey morris Posts: 52
edited 2005-08-11 06:58 in BASIC Stamp
I have a starter kit with BASIC Stamp 2. How can I clear a program from BASIC Stamp?

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-08 21:32
    Hello,

    ·· Simply writing a program with the statement, "END" will effectively clear the Stamp program.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • edited 2005-08-09 01:22
    You can also use a single DATA directive to write zeros into every byte in EEPROM.· It will clear any previously logged DATA as well as all old program tokens.

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    DATA 0 (2048)······· ' All BS2 EEPROM bytes -> 0
  • AmaralAmaral Posts: 176
    edited 2005-08-09 23:02
    may a look stupid question , but .. why you need to do that ?

    Amaral
  • knightofoldcodeknightofoldcode Posts: 233
    edited 2005-08-11 06:58
    Amaral said...
    may a look stupid question , but .. why you need to do that ?

    Amaral

    I know this seems trivial, but everyone should practice this and clear out all programs before programming/breadboarding a new project. Image this. You've got a LED on pin 0 of a stamp (turning on and off once every half second), then you go to a different project, and use that stamp pin (pin 0) as an input for a button press. ..... Now you've just shorted your pin, causing your stamp pin to die, and possibly the whole stamp, unless you've cleard out the program in EEProm. [noparse]:)[/noparse]

    Button schematic attached for an example.

    If you designed the button correctly, it wouldn't be an issue. However most people leave out the resister between the pin and ground. The schematic was stolen from Nuts and Volts Column #81 A Tale of Two Stamps.

    www.parallax.com/dl/docs/cols/nv/vol3/col/nv81.pdf
    attachment.php?attachmentid=38529

    Knight.
    418 x 251 - 11K
Sign In or Register to comment.