27.01.2015 Views

titus-larsen-titus-1981-apple-interfacing

titus-larsen-titus-1981-apple-interfacing

titus-larsen-titus-1981-apple-interfacing

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ue in sequence (in binary), 255, 255, 0, 1, 2 ... 254, 255, 0, 1, etc.<br />

is program will be seen again, in the experiments.<br />

Example 3·1. An 8-Bit Binary Counting Program for Port 49320<br />

FOR N = 0 TO 255<br />

POKE 49320,N<br />

NEXT N<br />

GOTO 10<br />

Output ports are rather easy to construct. Most parallel-in, paral­<br />

·<br />

-out lo ic evice inte h ca abilities can be used as<br />

c Examples of devices that can be use as latches are the<br />

74193 programmable binary counter, the SN74LS194A universal<br />

ift register, the SN74198 shift register, etc.<br />

Most output ports are readily configured with standard inteated<br />

circuits, but some of the newer integrated-circuit devices that<br />

· meant specifically for use with microcomputers are becoming<br />

ilable with built-in latch functions. An example is the Signetics<br />

5018 8-bit digital-to-analog converter chip which contains a latch<br />

tion.<br />

Typical applications for output ports include the following:<br />

Transfer data to a printer<br />

Transfer data to a video display<br />

Control a traffic light<br />

Transfer data to a floppy disk<br />

Actuate switches on a model railroad<br />

Control valves and pumps in a chemical process<br />

Control a plotter<br />

Transfer data to a seven-segment display<br />

Control another computer<br />

n some applications, the value of the information is actually used,<br />

· e in others, the on or off state of each bit is used. Some devices<br />

as a printer may use a combination: ports for the transfer of the<br />

to be printed and ports for the control of the printer functions.<br />

lays made up of seven-segment LEDs frequently require the<br />

•··of several output ports, even though the display is considered to<br />

only one "device."<br />

INPUT PORTS<br />

pput ports are used with 1/0 devices so that they may transfer<br />

mation to the computer in 8-bit bytes. Unlike output ports that<br />

be able to accept and hold information that is placed on the bus<br />

specific time, and may be continuously connected to the data<br />

input ports must be able to "disconnect" themselves from the<br />

49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!