BASIC Stamp FAQ
STAMP FAQS PROGRAMMING INFORMATION
Last Revised On: 7/21/00 Page: 11
How much current can the BASIC Stamp’s on-board regulator provide?
The built in 5-volt regulator on the BASIC Stamp I and BASIC Stamp II can supply 50 mA of current if powered
by a 12-volt source. The BASIC Stamp IIsx’s regulator can supply 150 mA if powered by a 7.5-volt source. The
BASIC Stamp I consumes 2 mA in running mode and the BASIC Stamp II consumes 7 mA. This leaves 48 mA
and 43 mA respectively for use with other circuitry via the VDD pin and the I/O pins. The BASIC Stamp IIsx
consumes 65 mA, leaving 85 mA for use with other circuitry via the VDD pin and the I/O pins.
Can the BASIC Stamp generate a sine wave?
Only the BASIC Stamp II, BASIC STAMP IIe and BASIC Stamp IIsx can generate sine waves. The BASIC
Stamp II uses the FREQOUT command to generate from 0 Hz to 32,767 Hz. The BASIC Stamp IIsx uses the
FREQOUT command to generate from 0 Hz to 81,917 Hz. Note that the output from the FREQOUT command
appears to be static when viewed on an oscilloscope. This is due to the nature of the underlying algorithm that
generates the frequency, however, when averaged out over time, the result is a sine wave. You may achieve a
cleaner signal by attaching the I/O pin to an appropriate RC filter circuit.
Can the BASIC Stamp generate a sine wave on two pins at once?
No. The BASIC Stamp is a single-task device and thus will execute only one FREQOUT command at a time.
Can the BASIC Stamp generate more than one sine wave on a pin at the same time?
Yes, the BASIC Stamp II, IIe and IIsx’s FREQOUT command can generate two frequencies at the same time, on
the same pin. This can be used to create harmonics, which greatly improve the sound output.
Can the BASIC Stamp generate square waves?
Yes, however, it is limited. The SOUND command in the BASIC Stamp I generates square waves which vary
from 94.8 Hz to 10,550 Hz (non-linearly). The BASIC Stamp II, IIe and IIsx, however, does not include any
functions to generate an accurately timed square wave, however, it can be done manually as long as fast timing is not
an issue. This can be done with multiple lines of code that simply set a pin high or low and pause for the appropriate
duration in-between transitions. The timing will vary somewhat depending upon your loop execution speeds.
Does the BASIC Stamp include a real time clock function?
No. If you need to keep track of time, especially dates and time, it is best to interface a real time clock to the
BASIC Stamp. Many are available from various manufacturers. The real time clocks with a serial interface are
usually the best choice, as they require fewer I/O pins from the BASIC Stamp to function properly. Parallax sells
the DS1302 Application Kit to address this issue.
Does the BASIC Stamp have a built-in timer?
Yes, however, it is used for timing functions within the BASIC Stamp interpreter and there is no direct access to it
through any PBASIC commands. Refer to BASIC Stamp I Application Note #20, “An Accurate Timebase” for
one possible solution to timing problems.