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.

·when the Apple computer is progrnmmed to perform a data transfer<br />

using either of the general-purpose I/ 0 commands, PEEK or<br />

POKE, certain signals are generated by the 6502 processor to synchronize<br />

the flow of data. At this point, our main concern is the use<br />

of the address bus lines. These are the 16 lines that address individual<br />

memory locations and I/ 0 devices. You should recall that the<br />

PEEK and POKE instructions each contain decimal address information<br />

that is used to identify the addressed memory location or I/0<br />

device. Of course, the Apple computer has no way of distinguishing<br />

between a memory location and an I/ 0 port<br />

DEVICE ADDIUiSSiNG<br />

Each If 0 device that is to be used with the computer must be able<br />

to recognize its own device address. Since the PEEK and POKE<br />

commands use 16-bit addresses, each If 0 device must monitor these<br />

16 address lines, Al5-AO, for the occurrence of its address. There are<br />

three basic schemes that may be used by I/ 0 device circuits to accomplish<br />

the monitoring for a specific address. These are:<br />

® Gating-detecting a specific combination of logic signals.<br />

® Decoding-a more flexible gating scheme in which many addresses<br />

may be detected.<br />

® Comparing-comparing a preset or known address with the address-bus<br />

signals until a match occurs.<br />

Combinations of these three techniques are possible and there are<br />

probably many variations that are possible. We will describe examples<br />

of each of the three basic address decoding schemes.<br />

lBsillilg Gillies for Addre!ls Dee:@ding<br />

In the scheme for decoding device addresses in which individual<br />

gates are used, the address must be known so that the gates can be<br />

properly configured. In this example, we will use the device address<br />

1010100011110llb or 4325510. Since the binary notation is long, and<br />

somewhat cumbersome, you might feel more comfortable with the<br />

hexadecimal equivalent, A8F7H. Since NAND/ AND gates are the predominant<br />

type of gating logic available, we will use these types of<br />

circuits in our logic.<br />

To refresh your memory, the pin configurations for several types<br />

of AND/NAND gates are shown in Fig. 2-1, with the generalized truth<br />

table for a two-input AND gate and an equivalent NAND gate shown<br />

in Table 2-1. Since inverters such as the SN7404 are often found in<br />

device addressing circuits, a pin configuration for this chip has been<br />

included in Fig. 2-1. The truth tables in Table 2-1 also show the function<br />

of an inverter. In all cases, the logic one state is the higher volt-

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

Saved successfully!

Ooh no, something went wrong!