09.05.2015 Views

Microcomputer Circuits and Processes

Microcomputer Circuits and Processes

Microcomputer Circuits and Processes

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

INPUT AND OUTPUT<br />

Devices that input bits of information into the computer are vital: to get<br />

the program loaded into memory in the first place, to input users'<br />

comm<strong>and</strong>s 'via the keyboard, <strong>and</strong> to make measurements on the<br />

external (real, no~-computer bussed) world. Similarly, output devices<br />

are needed to drive television screens, printers, <strong>and</strong> circuits which<br />

control robots making cars.<br />

Many input <strong>and</strong> output devices transfer their information in whole<br />

bytes, like the keyboard <strong>and</strong> television shown in figure 2.25. These need<br />

to be hung on the data bus, via the usual tristate buffer. In the case of an<br />

ouput the CPU must select the correct device by pulsing the enable high<br />

while sending out data, on the bus, which is then picked up by the<br />

device.<br />

D<br />

keyboard<br />

select<br />

television<br />

select<br />

data bus<br />

Figure 2.25<br />

How input <strong>and</strong> output devices are hung onto the bus via tristate buffers. This implies the<br />

need for more control signals to select the devices.<br />

The only connection to be made is a signal to enable the output<br />

buffer. One way of doing this is to think of the output device as a<br />

location in memory which may be written to by a normal WRITE<br />

operation. In that case, the output buffer can be enabled by a decoded<br />

memory address. Of course, no real memory must live at this address -<br />

that would cause bus contention. The method is shown in figure 2.26. It<br />

has the disadvantage of using up memory space, <strong>and</strong> needs a large<br />

address<br />

bus<br />

16<br />

4<br />

8<br />

CPU<br />

o<br />

E<br />

C<br />

o o<br />

E<br />

R<br />

television<br />

screen<br />

D<br />

Figure 2.26<br />

Selecting an output device by<br />

decoding one memory address.<br />

The output device looks like a<br />

memory cell to the CPU.<br />

22

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

Saved successfully!

Ooh no, something went wrong!