PDA

View Full Version : Clearing program from BASIC Stamp?



jeffrey morris
08-09-2005, 05:29 AM
I have a starter kit with BASIC Stamp 2. How can I clear a program from BASIC Stamp?

Chris Savage
08-09-2005, 05:32 AM
Hello,

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

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

Andy Lindsay (Parallax)
08-09-2005, 09:22 AM
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

Amaral
08-10-2005, 07:02 AM
may a look stupid question , but .. why you need to do that ?

Amaral

knightofoldcode
08-11-2005, 02:58 PM
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. :)

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 (http://www.parallax.com/dl/docs/cols/nv/vol3/col/nv81.pdf)
http://forums.parallax.com/attachment.php?attachmentid=38529

Knight.