Page 56 ·
Robotics with the Boe-Bot
Figure 2-9
Timing Diagram for
PulseBothLeds.bs2
The LEDs emit
light for 0.13
seconds while the
signal is high.
The voltages (Vdd and Vss) in this timing diagram are not labeled.
With the BASIC
Stamp, it is understood that the high signal is 5 V (Vdd) and the low signal is 0 V (Vss).
This is a common practice in documents that explain the timing of high and low signals.
Often there are one or more of these documents for each component inside the circuit an
engineer is designing. The engineers who created the BASIC Stamp had to comb through
many of these kinds of documents looking for information needed to help make decisions
while designing the product.
Sometimes the times are also left out, or just shown with a label, like t
high
and t
low
. Then, the
desired time values for t
high
and t
low
are listed in a table somewhere after the timing diagram.
This concept is discussed in more detail in
Basic Analog and Digital
, another Parallax
Stamps in Class Student Guide.
√
Enter, save, and run PulseBothLeds.bs2.
√
Verify that both LED circuits simultaneously pulse for about thirteen hundredths
of a second, once every two seconds.
' Robotics with the Boe-Bot – PulseBothLeds.bs2
' Send a 0.13 second pulse to P13 and P12 every 2 seconds.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
0.13 s
0.13 s
P12
0.13 s
0.13 s
2.26 s
P13