IIEST, Shibpur

Indian Institute of Engineering Science and Technology, Shibpur

(Formerly Bengal Engineering and Science University, Shibpur)

Empowering the nation since 1856

आई आई ई एस टि, शिवपुर

भारतीय अभियांत्रिकी विज्ञान एवं प्रौद्योगिकी संस्थान, शिवपुर

(पूर्व में बंगाल इंजीनियरिंग एंड साइंस यूनिवर्सिटी)

१८५६ से देश को सशक्त बनाना

Microprocessor Laboratory, CST Department
Bengal Engineering and Science University

Experiment No. III: Simple Input and Output Devices and interfaces
 

Objective: To know how to communicate with external world.

Preamble: Through the input and output devices (commonly referred to as I/O ports a CPU communicates with the external world. Input and output devices have got the largest variations in terms of size, cost and complexity in a computing device - the range includes simple switches, touch screens, keyboard, LEDs, Monitors, printers etc. These devices may not be connecetd directly to the microprocessor based systems as may not be directly compatible (electrical, mechanical and speed compatibilty). We need interfaces to make them compatible. These interfaces in turn may be complex system consisting of specialised harware and smart controllers.

Simplest possible input and output devices:

A switch encoding the logic state of a particular input point is the simplest possible input device whereas an LED could be the output counterpart of a switch. In case of an input we need to isolate it from the BUS (point through which the system read the status of the switch) as the BUS carries different signals at different times and the signal from the switch must not be mingeld with other signals in the bus. Similarly for an output device the output (coming from the CPU) must be latched somewhere to get similar isolation from other output signals being carried by the same bus. One bit input and output are shown in the following diagram.

Simple I/O

So the requirements for input and outputs are primarily a tri-state gate and a latch respectively. Sepcialised devices are available in the form of a single IC where 2/3, 8-bit I/O ports are embedded for the esae of interfacing the I/O devices. The I/O ports may even be configured into many forms by the control port residing in the same IC. These ICs are commonly referred to as PIO (Programmable I/O) or PPI (Programmable Peripheral Interface). In our experiment we will use one such popular PIO (Namely, INTEL 8255).

Task: Study 8255. Write routines to get input through switch(s) and one 8255 input port and output the same using one 8255 output port with LEDs connected to the output bits as shown in the figure above.

Report: 1) Explain: I/O operation, Memory and I/O mapped I/O, Foldback. (2) Draw IOread and IOwrite machine cycles.