Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
In this example, the 8-bit binary value is converted to a deci<br />
number between zero and 255 when it is input by the Apple u<br />
the PEEK command at line 10 in the progrnm. It is then "printed"<br />
the video monitor screen. It would have been just as valid to use<br />
following command:<br />
10 PRINT PEEK(4932 1): GOTO 10<br />
A similar input port may be constructed by using an SN7 4LS2<br />
octal ( 8-bit) buffer. This chip contains two independent sets off<br />
buffers ch, which are independently controlled with two ena<br />
inputs, 2G and lG. Since there are no built-in NOR gates in the SN<br />
LS244, external device select gating is required. A typical input p<br />
in which an SN74LS244 chip has been used is shown in Fig. 3-1<br />
Software steps similar to those shown in Example 3-2 would be us<br />
SN74LS244<br />
18<br />
07 A<br />
4 16<br />
6 14<br />
8 12<br />
INPUT DATA 11 9 DATA BUS<br />
DO<br />
13 7<br />
15 5<br />
17 3<br />
D7<br />
DO<br />
Rii<br />
ADDRESS<br />
TG<br />
2G<br />
!Fig. :>-12. h•p"i porl nfiw•d wih 11n Si'!l1,.l52'14 Mp.<br />
to control the flow of information from this port into the '"'v''"JJ"-"'"'<br />
Both the SN74365 and the SN74LS244 have "''--.-..-.·r-"''"'<br />
lent circuits that invert the data bits as they are passed ..... ,.., ..<br />
chips and onto the data bus. These buffers are the SN74366<br />
SN74LS240, respectively. The SN74366 is also equivalent to<br />
DN8096 chip. In most cases, the noninverting buffers will be the<br />
used in interface circuits.<br />
In some cases, peripheral devices may generate more than eight<br />
bits of information that must be read by the computer. An example<br />
of such a device would be a 12-bit analog-to-digital converter. When<br />
more than eight bits of information are to be input, the bits are divided<br />
into groups of eight bits. In the case of the 12-bit converter,<br />
there would be two groups, one containing 8 bits, and the other containing<br />
the remaining four bits. Likewise, a 16-bit value would require<br />
two input ports, as would a 9-bit value. When not all eight bits<br />
in an input port are used, the unused bits are generally placed in the<br />
logic zero state by connecting them to ground, or logic zero. If the