10) Encoder Prac 10

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 8

Logic Design & Switching Circuits

Engineering

Institute of Industrial Electronics

Encoders

Lab Session 10 ENCODERS


OBJECTIVE
To Verify the characteristics of Encoders.

APPARATUS
Power Supply Resistors LEDs Jumper wires DIP switches 4 bit Encoder (74LS148)

THEORY:
An Encoder is a combinational logic circuit that essentially performs a REVERSE decoder function. An Encoder accepts an active level on one of its inputs representing a digit, such as a decimal or octal digit, and converts it to a coded output, such as BCD or binary. Encoders can also be devised to encode various symbols and alphabetic characters. The process of converting from familiar symbols or numbers to a coded Format is called Encoding. An encoder can be a device used to change a signal (such as a bit-stream) or data into a code. The code serves any of a number of purposes such as compressing information for transmission or storage, encrypting or adding redundancies to the input code, or translating from one code to another. This is usually done by means of a programmed algorithm, especially if any part is digital, while most analog encoding is done with analog circuitry.

Single bit 4 to 2 Encoder


An encoder has 2n input lines and n output lines. The output lines generate a binary code corresponding to the input value. For example a single bit 4-to-2 Encoder takes in 4 bits and outputs 2 bits. It is assumed that there are only 4 types of input signals these are: 0001, 0010, 0100, 1000.

Decimal to Binary Encoder


This type of Encoder has 10 Inputs. One for each decimal digit. And four outputs corresponding to the BCD code. As Shown Below.

22

Logic Design & Switching Circuits


Engineering

Institute of Industrial Electronics

Encoders

This is the basic 10 to 4 line Encoder. The BCD code i.e. from MSB LSB (8421) is listed in below Table. From this we can examine the relationship between each BCD and Decimal Digits in order to analyze the Logic. The 74LS147 Encoder is Used for the Decimal to Binary Encoder.

Basic Logic Diagram of Decimal to Binary Encoder is As Follows. A 0-Digit input is not needed because the BCD outputs are all Low when there is no High Input.

8 line-to-2-line Priority Encoder:


The 74LS148 Encodes Eight Data lines to three-line (4-2-1) binary (octal). By providing cascading circuitry (Enable Input EI and Enable Output EO) Octal Expansion is allowed without needing external circuitry. The 74LS148 8-input priority Encoder accepts data from eight active LOW output and provides a binary representation on the three active LOW outputs. A priority is assigned to each input so that when two or more inputs are simultaneously active, the input with the highest priority is represented on the Output, with input Line I 7 having the highest priority.

Logic Design & Switching Circuits


Engineering

Institute of Industrial Electronics

Encoders

The two different Logic Symbols of 74LS148 is Shown Below:

The pin configuration of 74148 is Shown Below:

The 74LS148 can be expended to 16-to-4 line Encoder by connecting the EO of higher order encoder to the EI of Lower order encoder and Negative-ORing the corresponding outputs. The EO is used as the fourth and most significant bit. This particular configuration produces active High outputs for the 4-bit binary number.

22

Logic Design & Switching Circuits


Engineering

Institute of Industrial Electronics

Encoders

The Function Table of Encoder 74LS148 is:

INPUTS 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0
Where, 1 = HIGH Voltage Level 0 = LOW Voltage Level

OUTPUTS 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1

EI D7 D6 D5 D4 D3 D2 D1 D0 GS A2 A1 A0 EO 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1

Circuit Diagram:
U5 0 28 0 0
10 11 12 13 1 2 3 4 5 8 D0 D1 D2 D3 D4 D5 D6 D7 EI GND VCC A0 A1 A2 GS EO 16 9 7 6 14 15

1 2 3 4

74LS148N

Logic Design & Switching Circuits


Engineering

Institute of Industrial Electronics

Encoders

PROCEDURE:
Construct the circuit as shown below. Now close the dip switch and power on the voltage source. Observe the status of the LED. Now open the dip switch and observe the status of the LED. Also try to obtain output waveform by connecting Oscilloscope probes across the resistor and quickly switching on & off the dip switch.

SIMULATION RESULTS:

Logic Design & Switching Circuits


Engineering

Institute of Industrial Electronics

Encoders

OBSERVATIONS:
We observe that the output comes in following the Truth Table given below:

INPUTS 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0
Where, 1 = HIGH Voltage Level 0 = LOW Voltage Level

OUTPUTS 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1

EI D7 D6 D5 D4 D3 D2 D1 D0 GS A2 A1 A0 EO 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1

CONCLUSION:
The Encoders are very useful circuits to convert decimal inputs to Binary output and is used in Keypad circuits.

You might also like