You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
At the end of the subroutine, A represents the units, or "ones."<br />
could have used a new variable for this purpose, if you wished.<br />
In some cases, it may be difficult for you to remember that<br />
are tricking the Apple into generating bed values for you, since yQ<br />
are really interested in the binary codes that are being output ·<br />
the port. Thus, while you have tricked the Apple into outputti<br />
the binary pattern 10011001, which represents 99 in bed, the App<br />
really thinks that it is outputting a decimal 153, which is the nu<br />
her that causes the binary pattern, 10011001, to appear on the LED<br />
There are many different ways in which you can "fool" the co<br />
puter into working with odd codes, or codes that do not match t<br />
ones that it normally uses. ,<br />
If you are going to go on to further experiments, you may wan<br />
to leave the SN74LS373 output port on your breadboard. However<br />
if you already have another output port already available, the SN·<br />
74LS373 circuit may be removed. Power may be turned off.<br />
IPYrfHll5e<br />
EXPERIMENT NO. 13<br />
OUTPUT-PORTS TRA.fIC-IJGHT CONTROIJ.ER<br />
The purpose of this experiment is to show you how the<br />
computer may be used as a controller in a real application.<br />
Di:;c;yssi@11<br />
While the control of a traffic light may not seem like a<br />
problem for us to tackle with the computer, it does illustrate<br />
ability of the computer to make decisions and control<br />
events.<br />
Sep 1<br />
An 8-bit output port will be used in this experiment. If you<br />
one already connected to your computer, you can use it as long as<br />
it can control some LEDs. If you have completed one of the output<br />
port experiments, you may use one of the output port circuits used<br />
in the experiment. If you need to construct an output port, we refer<br />
you to Experiment No. 8.<br />
Lamp monitors or individual LEDs may be used to simulate the<br />
lamps of the traffic light. Only six LEDs are needed, since the northsouth<br />
and east-west lamps would be the same, with a red, yellow,<br />
and green lamp for each. We used colored LEDs and we adopted<br />
the following convention: