28128 Parallax Inc, 28128 Datasheet - Page 101

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
The piezoelectric speaker shown in Figure 5-2 has positive and negative terminals shown
on both the circuit symbol and the component. The speaker from the Analog and Digital
Parts Kit has a plus (+) on its topside above the appropriate pin.
If you saved the circuit that was developed in Chapters #3 and #4, you are ready for the
next step. Otherwise, rebuild the circuit shown in Chapter #4, Figure 4-8.
Program It
Start with an unmodified version of Program Listing 4.1, and make the following
changes. Changed lines are shown with
Modify the first line as shown:
After the
below:
Modify the
Calc_Volts
command should be changed to a
' Basic Analog and Digital – PL5_1R0.bs2
'Start display
DEBUG CLS
DO
LOOP
DEBUG CLS
FOR n = 7 TO 15
NEXT
FOR n = 14 TO 8
NEXT
Main
GOSUB Main
GOSUB Main
command should be commented with an apostrophe, and second, the
routine as shown. There are two changes to make. First, the
command, insert a code block nested in a
RETURN
and added lines are shown with a .
command.
Figure 5-2
Piezo Speaker
Circuit symbol and
part.
'
'
'
'
'
'
'
'
DO…LOOP
'
as shown
GOSUB
LOOP

Related parts for 28128