BASIC Stamp FAQ
STAMP FAQS PROGRAMMING INFORMATION
Last Revised On: 7/21/00 Page: 12
Does the BASIC Stamp support interrupts?
No, the interpreter chip used in the BASIC Stamp does not support interrupts. In many cases, a fast polling routine
may be used to accomplish the same effect, however, depending on the number and size of the tasks involved in
some applications, this will not be fast enough and the BASIC Stamp may not be a plausible solution.
Does the BASIC Stamp II, BASIC STAMP IIe or BASIC Stamp IIsx have the same
bsave/bsload feature available in the BASIC Stamp I?
No. It is intended to provide this feature in the future.
How do I program the BASIC Stamp?
You can write your PBASIC program using the BASIC Stamp I, II, IIe or IIsx editor on a standard IBM
compatible PC. Both DOS and Windows versions are available for the BASIC Stamp II, IIe and IIsx. After you
write the code for your application, you simply connect the BASIC Stamp to the computer’s parallel port (BASIC
Stamp I) or serial port (BASIC Stamp II, IIe and IIsx), provide power to the BASIC Stamp and press ALT-R
(DOS version) or CTRL-R (Windows version) within the appropriate BASIC Stamp editor to download your
program into the BASIC Stamp’s EEPROM. As soon as the program has been downloaded successfully, it begins
executing its new program from the first line of code.
How do I connect the BASIC Stamp to my computer for programming?
The BASIC Stamp I (rev. D or BS1-IC) requires a three-wire connection to any available parallel port on your PC.
The BASIC Stamp II, IIe and IIsx (BS2-IC and BS2SX-IC) require a standard, straight-through, serial cable
connection to a 9-pin or 25-pin serial port on your PC. Only 6 wires are used for programming the BASIC Stamp
II, IIe or IIsx, 4 of which are absolutely required. You can not use a null-modem cable to program the BASIC
Stamp II, IIe or IIsx. Refer to the schematics on our web site for the details of the cable connections,
http://www.parallaxinc.com/stamps/stmpsche.htm.
How does my program get stored in the BASIC Stamp?
Your PBASIC code is tokenized (compressed) and stored within the Stamp’s EEPROM memory. This memory is
non-volatile, meaning it retains its program even without power. Every time the BASIC Stamp receives power, it
starts running its PBASIC code starting with the first executable line. This EEPROM can be rewritten immediately,
without any lengthy erase cycle or procedure, by simply re-downloading the code from the BASIC Stamp editor
again. Each location in the EEPROM is guaranteed for 10,000,000 write cycles before it wears out. The code is
tokenized before downloading. Source code elements like comments and constant and variable names are not
stored in the BASIC Stamp, thus you may feel free to use as many comments and descriptive symbol names in your
code as you like without worrying about increasing your code size.
How do I erase the BASIC Stamp’s program space?
An erase cycle is performed at the beginning of every programming process (in the BASIC Stamp I) or during the
programming process (in the BASIC Stamp II, IIe and IIsx), thus, by downloading from the BASIC Stamp editor
the necessary areas of the EEPROM are erased and then reprogrammed with the current PBASIC program in the
editor. The BASIC Stamp II, IIe and IIsx only erase data in 16-byte increments. It is possible to completely erase
the EEPROM by downloading the following line of code (in a program by itself):
DATA 0(2048)