28129 Parallax Inc, 28129 Datasheet - Page 101

TEXT BASIC ANALOG & DIGITAL

28129

Manufacturer Part Number
28129
Description
TEXT BASIC ANALOG & DIGITAL
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet

Specifications of 28129

Style
Book
Title
Basic Analog and Digital
Contents
Basic Analog and Digital Text
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
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 28129