BASIC Stamp

From Wikipedia, the free encyclopedia

BASIC Stamp
BASIC Stamp

The BASIC Stamp is a microcontroller with a small, specialized BASIC interpreter (PBASIC) built into ROM. It is made by Parallax, Inc. and has been quite popular with electronics hobbyists since the early 1990s due to its low threshold of learning and ease of use (due to its simple BASIC language).

Although the Basic Stamp has the form of a DIP chip, it is in fact a small Printed Circuit Board that contains the essential elements of a microprocessor system:

  • A CPU
  • Memory (a serial EEPROM)
  • A clock
  • A power supply
  • External input and output

The Basic Stamp language incorporates common microcontroller functions, including PWM, serial communications, I²C and OWI communications, communications with common LCD driver circuits, hobby servo pulse trains, pseudo-sine wave frequencies, and the ability to time an RC circuit which may be used to detect an analog value.

The end result is that a hobbyist can connect a 9V battery to a Basic Stamp and have a complete system. A connection to a PC allows the programmer to download software to the Basic Stamp, which is stored in the onboard memory device. This memory stays programmed until it is erased and reprogrammed (the memory remains intact even when the power is removed).

There are currently three variants of the interpreter, Basic Stamp 1, Basic Stamp 2, and the Javelin Stamp. The Basic Stamp 2 variant has seven sub-variants:

  • BS2
  • BS2e
  • BS2sx
  • BS2p24
  • BS2p40
  • BS2pe
  • BS2px

The third variant is the Javelin stamp. This stamp uses Sun Microsystem's Java programing language instead of Parallax's PBasic

Many companies make virtual "clones" of the Basic Stamp with additional features, such as faster execution, Analog-to-digital converters and hardware based PWM which can run in the background. However, many use the same pin out as the Basic Stamp, to allow Basic Stamp users to plug in their products in a design that already uses the Basic Stamp.

[edit] Comparison with a bare PIC

This section compares the Stamp module with a 'bare' PIC, i.e. the microcontroller on its own.

  • The Original PICs were either one-time programmable parts, (not suitable for developers), or relatively expensive UV-erasable windowed parts. The Stamp provided the advantage of being quickly reprogrammable via a 3-wire serial interface for approximately the cost of a single UV-erasable PIC. This advantage is now gone: all current PICs are Flash-based, and support in-circuit programming.
  • Bare PICs require a separate programmer, the simplest programmers rely on using the control lines of a serial serial port for sending data. These programmers rely on the voltage available on the serial port of a desktop and as such are often unusable for owners of laptops or legacy free PCs. Simple parallel port programmers suffer from similar problems. Intelligent programmers are better but are more expensive to build and often require an existing working programmer to construct.
  • The Stamp implements a complete solution on a single PCB. In comparison, a bare PIC requires a separate power regulator and substantial decoupling on its output.
  • The Basic Stamp interprets instructions in real-time, essentially running a virtual machine on the PIC. This means that it is much slower (about 12kHz instruction clock, compared to 4MHz native), as well as using up registers and I/O to connect to the EEPROM. A bare PIC runs much faster, and has more instruction memory, register-space, I/O pins and some other features available.
  • The Stamp costs about $25, whereas a raw PIC costs about $1. There is a huge range of PICs.
  • BASIC is easier to learn than Assembly, but PIC assembly is very much more powerful. Furthermore, C-compilers are now available for the PIC.

[edit] See also

[edit] External links

In other languages