28128 Parallax Inc, 28128 Datasheet - Page 109

no-image

28128

Manufacturer Part Number
28128
Description
KIT BASIC ANALOG/DIGI PARTS ONLY
Manufacturer
Parallax Inc
Datasheet

Specifications of 28128

Accessory Type
ADC, DAC
Product
Microcontroller Accessories
For Use With/related Products
BASIC Stamp® 2 and Board of Education
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Enter this program into the BASIC Stamp Editor. This is not a modification to the
previous programs. Also, the output is the piezoelectric speaker and there is no Debug
Terminal output. Save this program as P5_2RO.bs2.
' Basic Analog and Digital - PL5_2R0.bs2
' D/A Converter Making Sound, n changes volume, m changes frequency
' {$STAMP BS2}
' {$PBASIC 2.5}
n
m
DIRB=15
n = 15
m = 500
DAC:
GOTO DAC
P7
P6
P5
P4
OUTB = n
PAUSE m
OUTB = 0
PAUSE m
VAR
VAR
2 k
2 k
2 k
2 k
Nib
Word
Vss
1 k
1 k
1 k
2 k
LM358
2 k
Vdd
Vss
A
Vss
Figure 5-5
Piezoelectric Speaker Circuit
Connected to the buffered output
of the D/A converter.

Related parts for 28128