28128 Parallax Inc, 28128 Datasheet - Page 107

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
Note that both the amplitude and period of the waveform increased. This is because the
BASIC Stamp is programmed to
level. The pause statement is part of the
The Pulse Train
The next waveform we'll examine is called the pulse train, though a better name for it
might be a rectangle wave. For a pulse train, the amplitude is the voltage between the
high and low voltage levels, and the DC offset is the voltage between 0 volts and the low
part of the signal. The period and frequency are the same for a pulse train as they are for a
triangle wave. So the period is still the amount of time the waveform takes to repeat
itself, and the frequency is still the number of times the waveform repeats itself in a
second. The frequency is also still the inverse of the period.
The
frequency of the original triangle wave. The variable
are skipping the
value of
value. Let's start with a high value of 3 volts and a low value of 0 volts. Modify the
DO…LOOP
Run the program and view the pulse train. Then try to change the various adjustments to
the code and view what happens to the pulse train. Is it really square? You can adjust the
DO…LOOP
DO
LOOP
DO
LOOP
n
code block as shown below, and save the modified program as P5_1R1.bs2
, which controls the D/A converter output, can be set to a high value and a low
FOR n = 1 TO 15
NEXT
FOR n = 14 TO 0
NEXT
FOR v2 = 0 TO 15
NEXT
FOR v2 = 15 TO 0
NEXT
GOSUB Main
GOSUB Main
n=15
GOSUB Main
n=0
GOSUB Main
code block can be modified to make a pulse train that has the same
Calc_Volts
subroutine. It can be used to for counting up and down. The
pause
DAC
for a fixed amount of time at each output voltage
routine.
v3
is not used right now because we
'
'
'
'
'
'

Related parts for 28128