Specifications
BASIC Stamp I and Stamp II Conversions
Page 402 • BASIC Stamp Programming Manual 1.8 • Parallax, Inc.
• PIN may be in the range 0..15.
Example:
BS1: SOUND 1, (92, 128, 75, 25)
BS2: FREQOUT 1, 1536, 333
FREQOUT 1, 300, 226
CONVERSION: BS1 Q BS2
1.Change command name ‘FREQOUT’ to ‘SOUND’.
2.PIN must be in the range 0..7.
3.Insert an open parenthesis just before the MILLISECONDS argu-
ment.
4.Swap the orientation of MILLISECONDS with FREQ1 and divide
MILLISECONDS by 12. (DURATION = MILLISECONDS / 12).
5.Calculate NOTE using the formula: NOTE = 127 - ((1/FREQ1) - 95
x 10
-6
) / 83 x 10
-6.
6.Successive FREQOUT commands may be combined into one
SOUND command by separating NOTE and DURATION pairs
with commas.
7.Insert a close parenthesis, ‘)’, after the last DURATION argument.
• Notes can not be mixed as in the Stamp II
Example:
BS2: FREQOUT 15, 2000, 400
FREQOUT 15, 500, 600
BS1: SOUND 7, (98, 167, 108, 42)










