Logic Devices for Interfacing

A microcomputer system consists of four components namely microprocessor, memory, input devices and output devices. In order to design a microprocessor based system for a particular application, the designer has to select suitable memories and I/O devices, and interface them to the microprocessor. But these memories and I/O devices must be compatible with the microprocessor, both in speed and timing characteristics. If a particular device is not compatible, additional electronic circuit has to be designed, through which the device may be connected to the CPU. Before discussing interfacing circuits for connecting memory and I/O devices to the microprocessor, let us have a review of logic devices used for interfacing.

1. Tristate devices

Normally a logic circuit has only two states: Logic 1 and Logic 0. Tristate logic device has three states: Logic 1, Logic 0 and high impedance (high Z state). The term "Tristate" is the trademark of National Semiconductor Company and is used to represent the three logic states. A tristate logic device has a third input called enable input.

Here the enable input is active low input i.e., inverter is active only if a low is given to the enable input. If the enable input is disabled (logic high), the inverter will enter a high impedance state. That is, the inverter will not respond for the input.

2. Buffer

The buffer is a logic circuit that amplifies the current or power. It has one input and one output line. The logic level of output is the same as that of the input i.e., logic 1 input provides logic 1 output. The symbol for buffer is shown in Figure.

The buffer is commonly used to increase the driving capability of a logic circuit. It is also known as driver.

3. Decoder

A decoder is a logic circuit used for detecting the presence of a specified combination of bits on its inputs and to indicate that code by a specified output level. Generally a decoder has n inputs and 2n outputs. Figure shows a 2:4 decoder with active low output lines.

For example, if the input is 01, the output line 1 will be low and all other output lines are high. Here, the decoder will function only if a low is given to the enable input (enable input is active low). Decoders are commonly used in interfacing I/O devices and memory to the microprocessor.

4. Semiconductor Memory

A memory unit is an integral part of a microcomputer system. It is used to store programs, data and result. A microprocessor based system uses a number of memory devices of different technologies such as magnetic memory, semiconductor memory and optical memory. The speed of the memory must match with the operating speed of the CPU. If the memory is slow, the CPU has to wait for data and instructions. Memory devices are broadly classified into two groups.

(i) Primary memory

(ii) Storage memory

Primary memories are fast semiconductor memories. While storage memory refers to the storage medium comprising slow devices such as magnetic tapes, hard disks, floppy disks, compact disks (CD) etc. These devices are used to hold large data files and huge programs such as compilers, application programs etc. The primary features of these devices are high storage capacity, low cost and slow access. The access time for these devices is of the order of millisecond.

Primary memory

It refers to the storage area which can be directly accessed by the processor. All programs and data must be stored in primary memory prior to execution. In primary memories the access time must be compatible with the read/write time of the processor. Access time is the time to access any particular memory location. Therefore semiconductor memories are used as primary memories. (The access time for semiconductor memory is only 50 ns. Also, CPU is a semiconductor device.

Semiconductor memories are broadly classified into two.

(1) RAM (Random Access Memory)

(2) ROM (Read Only Memory)

RAM:

In a random access memory, any memory location can be accessed in a random way. That is, the access time is same for each and every memory location. RAM is also called read/write memory (R/WM), since the processor can write into or read from this memory. RAM is also a volatile memory. That is, it stores information as long as the power is supplied to it. Its contents are lost when power supply is switched off.

RAM is again classified into two.

(a) Static RAM (SRAM)

(b) Dynamic RAM (DRAM)

Static RAM retains the stored information as long as power supply is ON. But DRAM loses its stored information in a few milliseconds even though its power supply is ON. A DRAM stores information in the form of charge on a capacitor; which leaks away in very short time. Therefore its content must be periodically refreshed for restoring the capacitor charge (usually every 2ms). Thus DRAM requires a refreshing and control circuitry which will increase the cost of the system.

A DRAM requires only one transistor and a capacitor. That is, DRAM requires only one transistor per memory cell. (Memory cell is an electronic circuitry which stores a binary bit 0 or 1). But SRAM uses six transistors in a memory cell. Therefore, packing density is more for DRAM compared to SRAM. Also, DRAM consumes less power.

ROM

ROM is a non volatile memory. That is, it retains the stored information even if the power is OFF. This memory is used for storing programs and data permanently (i.e., need not be altered later). It is cheaper than RAM. Different types of ROM available in market are

Masked ROM

In masked ROM, the information is stored permanently by the manufacturer at the time of manufacturing.

Example: Audio CD of a movie.

PROM (Programmable ROM):

This memory can be programmed by the user with a special 'PROM Programmer'; which selectively burns the fuses (within the PROM) according to the bit pattern to be stored.

EPROM (Electrically Programmable ROM):

The content of an EPROM can be erased and can be reprogrammed more than once. To erase its content, it is exposed to ultraviolet radiation for about 20 minutes. To facilitate the exposure of ultraviolet radiations, the EPROM chips are packed in a case which has transparent window.

Limitations of EPROM chips are

(a) It must be taken out of the circuit to erase it.

(b) The entire chip must be erased.

(c) The erasing process takes 15 to 20 minutes.

EEPROM or EEPROM (Electrically Erasable Programmable ROM):

They are also called Electrically Alterable ROM (EAROM). They need not be removed from the circuit board for erasure. Also, EEPROM is byte erasable. That is, selective erasure of its content is possible. Its content can be erased and programmed on the system board itself very easily on a byte by byte basis (need not be taken out of the circuit). Its disadvantage is that different voltage levels are required for erasing, writing and reading the stored information.

Flash Memory

It is also electrically erasable and reprogrammable. The major difference between Flash memory and EEPROM is in the erasure procedure. In Flash memory, the entire content is erased in one operation. That is, it is not byte by byte erasable like EEPROM. Unlike EEPROM, flash memory uses one transistor memory cell resulting in high packing density, lower cost and higher reliability.

In a microprocessor based product, programs are generally written in ROM and data that are likely to vary are stored in RAM.

For example, in a microprocessor controlled microwave oven, the program that 'runs' the oven is permanently stored in ROM; and the data such as starting time, baking period and temperature are entered in RAM through key pad.

Sreejith Hrishikesan

Sreejith Hrishikesan is a ME post graduate and has been worked as an Assistant Professor in Electronics Department in KMP College of Engineering, Ernakulam. For Assignments and Projects, Whatsapp on 8289838099.

Post a Comment

Previous Post Next Post