Interfacing Logic Devices – Overview YASH PAL, March 31, 2022December 29, 2024 Interfacing Logic Devices – Some of the semiconductor chips are needed to connect peripherals to the system bus. these chips are called interfacing devices. all peripherals and memory share the same bus, however, the microprocessor communicates with only one peripheral at a time. for the proper functioning of this system, tri-state logic devices are necessary. Types of Interfacing Logic Devices Tri-State Devices Buffer Encoder Decoder Latch Tri-State Devices As the name suggests, the tri-state devices have three states: logic 1, logic 0, and high impedance. A tri-state logic device is shown in the below image. A tri-state logic device has three terminals: input output enable When the third line (enable line) is activated. the tri-state logic functions the same way as ordinary logic devices. when the third line is deactivated, the device behaves as disconnected from the system, this is called a high impedance state. Tri-state logic device (a) Active high enable line EnableInputOutput1001110*High Impedance (b) Active low enable line EnableInputOutput0000111*High Impedance The tri-state logic device with active-low enables line behaves just opposite to the device discussed above. the tri-state logic device is critical to the proper functioning of the microprocessor-based system. Buffer Whenever a system is designed, a number of devices are connected to the output of one digital device. if the output current of the digital device is not sufficient to drive other devices, the current capacity of the output of the digital device has to increase. the buffer is used to increase the driving capability of a digital or logic device. it is also known as the driver. a buffer increases the output current. Sometimes, a change in voltage levels is required. this is also achieved by a suitable buffer or driver. a buffer is symbolized by a triangle as shown in the below image. for an inverting buffer, a bubble is put at the output point of the triangle. a tri-state buffer has one additional line named enable. when the enable line is low (for active low case), the circuit behaves as a buffer, otherwise, it stays in the high impedance state. In microprocessor-based systems, the buffer is used to increase the driving capability of the data and address bus. since the address bus is unidirectional, a unidirectional buffer (example – 74LS244) is used however data bus s bidirectional, a bidirectional buffer (example – 74LS245) is used. Various symbols and Truth table (a) Buffer InputOutput0011 (b) Inverting Buffer InputOutput0110 (c) tristate buffer (active low) EnableInputOutput0000111*High Impedance Various buffer driver ICs are available. some of them are shown in the table below. IC NumberDescription7406, 7416Hex inverter buffer/driver with open collector output7407, 7417Hex Buffer/driver with open collector output74125Quad bus buffers gates with 3 state outputs; output is enabled when c = ‘0’74126Quad bus buffers gates with 3 state outputs; output is enabled when c=’1′74240Octal buffers/line drivers/line receivers, inverted 3 state outputs74241, 74244Octal buffers/line drivers/line receivers, inverted 3 state outputs74245Octal bus buffer/driver (Bidirectional) noninverted 3 state outputs7426, 7437Quad 2 input NAND buffers7438Quad 2 input NAND buffers with open collector outputs7440Dual 4 input NAND buffers7428Quad 2 input NOR Buffers7433Quad 2 input NOR buffers with open collector output74128Quad 2 input NOR line drivers Encoder The encoder is a logic circuit that provides the appropriate code as the output for each input signal. examples of encoder ICs are: 74LS147 decimal to BCD encoder 74LS148 octal to binary encoder The hexadecimal to binary encoder can be realized using two 74LS148 ICs and a data selector. the IC 74LS148 is also known as a priority encoder. it has eight inputs and one active low enable signal. it has five output signals (three are encoding lines and two are output enable indicators). when the encoder is enabled and one line, for example, line 3 goes low, the output is 011. if two or more input signals are activated simultaneously it ignores the low-priority inputs and encodes the highest-priority input. the output of this encoder (IC 74LS148) is active low means output will be inverted. when input line 3 is active the output is 100 instead of 011. Encoder InputOutput E1I7 I6 I5 I4 I3 I2 I1 I0O2 O1 O0G2 E01x x x x x x x x1 1 11 101 1 1 1 1 1 1 11 1 11 001 1 1 1 1 1 1 00 0 01 001 1 1 1 1 1 0 10 0 10 101 1 1 1 1 0 1 10 1 00 101 1 1 1 0 1 1 10 1 10 101 1 1 0 1 1 1 11 0 00 101 1 1 0 1 1 1 11 0 00 101 1 0 1 1 1 1 11 0 10 101 0 1 1 1 1 1 11 1 00 100 1 1 1 1 1 1 11 1 10 1 Decoder The microprocessor-based system or any other digital system uses binary numbers for its operations. these understand only the information composed of 0s and 1s, whereas the user is allowed to use decimal numbers. the decoder is used to decode the information from binary to decimal. the decoder is a logic circuit that identifies each combination of the signals present at the input. decoding is the reverse process of encoding. examples of decoders are BCD to decimal decoder, and BCD to segment decoder. the logic diagram of the IC 74LS138 is shown below image. 3 to 8 decoder InputOutputG2 G1I2 I1 I0O7 O6 O5 O4 O3 O2 O1 O01 xx x x1 1 1 1 1 1 1 1x 0x x x1 1 1 1 1 1 1 10 10 0 01 1 1 1 1 1 1 00 10 0 11 1 1 1 1 1 0 10 10 1 01 1 1 1 1 0 1 10 10 1 11 1 1 1 0 1 1 10 11 0 01 1 1 0 1 1 1 10 11 0 11 1 0 1 1 1 1 10 11 1 01 0 1 1 1 1 1 10 11 1 10 1 1 1 1 1 1 1 Latch A flip-flop is the basic memory unit. a flip-flop in its simplest form is called a latch. it is a 1-bit memory element. it stores logic ‘0’ or logic ‘1’. the latch is used as a temporary storage device. for the temporary storage of n-bits, an n-bit latch is composed of a number of 1-bit latches, and then the n-bits of a binary word are transferred to the latch in parallel. Types of Microprocessor A latch is used commonly to interface output devices. a typical example of a latch is the 74LS75 D-flip-flop. this is actually a level trigged D-flip-flop. in this latch, when the enable signal (E) is high. the latch behaves as transparent. the output follows the input signal at pin D. When the enable signal goes low, the latch stores the input data at the last moment. this data is continuously available at the output termination (Q) of the latch till the enable signal is low. Once the enable signal is high, the latch again becomes transparent. the logic diagram of latch IC 74LS75 is shown below. Latch IC 74LS75 Latch plays an important role in microprocessor-based systems. when the microprocessor sends an output, data are available on the data bus for only a few microseconds, therefore, a latch is used to hold data for the peripheral. some of examples of latch ICs are shown in the below-given table. IC NumberDescription7475, 7477, 74ls3758-bit bistable latches74100Dual 4-bit latches741168-bit addressable latches742598 bit addressable latches74279Quad S-R latches engineering subjects microprocessor engineering subjectsmicroprocessor