28129 Parallax Inc, 28129 Datasheet - Page 124
![TEXT BASIC ANALOG & DIGITAL](/photos/6/49/64954/mfg_28129_sml.jpg)
28129
Manufacturer Part Number
28129
Description
TEXT BASIC ANALOG & DIGITAL
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet
1.28129.pdf
(176 pages)
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
- Current page: 124 of 176
- Download datasheet (3Mb)
Program It
Let's make a program that counts how many times the pulse train repeats itself. In effect,
we will make a program that determines the frequency of the pulse train. The BASIC
Stamp has a built in feature for counting frequency, and the PBASIC command is the
count command.
The BASIC Stamp increments the counter when the input voltage passes the 1.4 volt I/O
pin threshold twice. This makes programming and interpreting the frequency data easy
for periodic signals such as the pulse train, triangle wave and sine wave. Figure 6-7
shows why there are two threshold crossings per repetition of the waveform. When a
waveform repeats itself, it's called a cycle. With a 5 volt amplitude and a 0 volt DC
offset. Notice how the waveform crosses the threshold voltage twice per cycle.
Enter Program Listing 6.2 into the BASIC Stamp Editor and save it as P6_2R0.bs2.
' Basic Analog and Digital - PL6_2R0.bs2
' Frequency Meter
' {$STAMP BS2}
' {$PBASIC 2.5}
f
DO
LOOP
When you run the program, and adjust pot B to its maximum, the output should be
somewhere in the neighborhood of the frequency shown in Figure 6-8.
COUNT 0, 1000, f
DEBUG HOME, "Frequency:
1.4 Volts
5 Volts
0 Volts
VAR
Word
", DEC4 f, " Hz.", CR, CR
1 full cycle
Two crossings of the
threshold voltage
Figure 6-7
Full Cycle of
a Pulse Train
Related parts for 28129
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![30008](/images/manufacturer_photos/0/5/515/parallax_inc_tmb.jpg)
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
![70009](/photos/26/92/269208/70009-l_tmb.jpg)
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
![27404](/photos/26/91/269197/27404-l_tmb.jpg)
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
![70016](/photos/8/99/89966/mfg_70016_tmb.jpg)
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
![28135](/images/manufacturer_photos/0/5/515/parallax_inc_tmb.jpg)
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
![28023](/photos/9/30/93020/mfg_28023_tmb.jpg)
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
![30010](/photos/9/30/93025/mfg_30010_tmb.jpg)
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
![SX18AC/SO](/images/manufacturer_photos/0/5/515/parallax_inc_tmb.jpg)
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: