Parallax BASIC Stamp 2e Programming Manual page 322

Table of Contents

Advertisement

SOUND - BASIC Stamp Command Reference
from I/O pin
from I/O pin
Notes:
C1 may be omitted for piezo speakers
C2 is optional, but reduces high-frequency noise
Demo Program (SOUND.bas)
' This program generates a constant tone 25 followed by an ascending tones. Both the tones
' have the same period (duration).
'{$STAMP BS1}
SYMBOL
Tone = B0
FOR Tone = 0 TO 255
SOUND 1, (25, 10, Tone, 10)
NEXT
Page 320 • BASIC Stamp Programming Manual 2.0b • www.parallaxinc.com
Driving an Audio Amplifier
1k
1k
0.1µF
0.01µF
Vss
Vss
Vss
Driving a Speaker
10µF (both)
≥40Ω Speaker
(or 8Ω in series
+
+
C1
C2
with 33Ω resistor)
Vss
Vss
'STAMP directive (specifies a BS1)
Amplifier
(e
.g., Radio Shack
277-1008C)
Figure 5.42: Example RC filter
circuits for driving and audio
amplifier or a speaker.
1

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BASIC Stamp 2e and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents