Design 16x4 Priority Encoder Using 8x3 Priority Encoder
Design 16x4 Priority Encoder Using 8x3 Priority Encoder
EXPERIMENT
DESIGN 16x4 PRIORITY ENCODER USING 8x3 PRIORITY ENCODER
1 Objective
Design a 16X4 priority encoder using 8X3 priority encoders.
2 Aim
Test the functioning of the 16X4 priority encoder kit which is designed using two 8X3 priority encod
Board Design
a) Design objectives:
i. Use two 8X3 encoders
ii. Implement 16X 4 Encoder
iii. Indicate the binary output bits using LEDs
iv. Indicate Invalid output (When none of the inputs are active)
b) Components:
Technology: There are two choices for selecting the components i) TTL ii) CMOS.
Here TTL ICs are chosen forimplementing. Designs will depend on the technology
Requirement IC/Value Qnty Remark
i. 8X3 encoders 74LS148 2Nos 2X8X3 to 16X4 Encoder
ii. LED --- 5 1: Validity Indication
4: Binary output
iii. Driver for 74LS16 1 Each IC has 6 open Collector (No internal
LEDs collector load) Inverter Drivers
iv. Binary Output 74LS158 1 This IC has 4nos of 2to1 Multiplexers with
Selection common control to select which of the
binary outputs set from 74LS148s as
encoder output.
v. Diodes Any 2 For implementing AND gate (Explained
Switching later)
Diodes
vi. Resistors 220 Ohms 5 LED Current limiting
560 Ohms 1 Part of AND Gate design
Value Not Critical. Should help putting
diodes conducting when forward biased
vii. Shorting Links 2 Pin with 16 One unit for each input. When shorted it
Link provides logic ‘0’ to encoder input and
when open the status at the encoder input
is logic ‘1’ through pull up resistor
viii. Resistors SIP 2 Each SIP has 8 resistors of 10K each with
one end of all resistors connected together.
Please see the circuit for better
understanding
c) Component Details
i. 74LS148: 8 Line to 3 Line Priority Encoder
Pin numbers are marked inside the chip
diagram
Pin names are marked outside the chip
diagram
A0, A1, A2 are binary outputs (A0 is LSB)
EI is Enable input
EO is Enable Output meaning outputs are
enabled
GS is Group select: Meaning that this
indicates that at least one in inputs is active
EO & GS are active low outputs
0,1,2,3,4,5,6,7,8 are Encoder Inputs
VCC .. Connected to5V
GND … Connected to circuit common point
a) When EI is H, i.e. logic ‘1’, the encoder is disabled. Its outputs are HHH
(A2A1A0)
b) When EI is L, i.e. logic ‘0’, the encoder is enabled and none of the inputs (1-8)
are active (input = H) then also its outputs are HHH (A2A1A0)
c) When EI is L, i.e. logic ‘0’, the encoder is enabled and input ‘0’ is active (input =
L) then also its outputs are HHH (A2A1A0)
d) Hence it may be concluded that the above 3 conditions i.e. i) The chip is not
2 DESIGN & MANUAL: Dr. P. Sudhakara Rao [VMTW]
DIGITAL INTEGRATED CIRCUITS APPLICATIONS LAB 2018
enabled ii) none of the inputs active iii) ‘0’ input is active, the outputs shall be
understood along with other two outputs GS and EO
e) GS =EO = ‘1’ for chip not enabled;
f) GS = ‘1’ EO = ‘0’ for chip enabled but none of inputs is active
g) GS = ‘0’ EO = ‘1’ for chip enabled and at least one input is active and only for
this condition, the binary output bits are valid
ii. 74LS158
d) Design Basics:
The design concept is very simple. The design shall have 16 inputs and 4 binary
outputs corresponding to the active input. It shall indicate error state when none of the
inputs is active. The inputs are divided into two groups 1-8 and 9-16. Each group
drives one 8X3 priority encoder inputs. The encoder to which 1-8 inputs are connected
may be called as Enc-1 and the one to which 9-16 inputs are connected may be called
as Enc-2.
A) Choose 8X3 priority encoder that has enable input i.e. when the Encoder is
enabled, it gives following information:
i. A distinct state to indicate that none of the inputs is active
ii. A distinct state that indicates that at least one of the inputs is active
B) Since 8X3 encoder produces only 3 bit code (as it has only 8 inputs) and two such
Encoders are used, one Encoder which is connected to 1-8 inputs (Enc-2) is
always enabled. However Enc-1 is enabled only if none of the inputs of Enc-2 is
active.
C) Here there are two sets of encoded outputs available. One set belongs to Enc-1
and that produces 3 bit code when any of the 1-8 inputs are active and none of 9-
16 inputs are active. When any of the inputs of 9-16 is active, then the second set
of 3 bit code is available from Enc-2.
D) Since the total inputs are 16, the design shall produce 4 bit code and not 2 sets of
3 bit codes. Hence it is essential to design additional circuit that appends 4 th bit
appropriately. This 4th bit, MSB, shall be 0 if any of the 1-8 inputs is active and
hence 0 shall be appended to Enc-1 output. The 4th shall be ‘1’ when any of the 9-
16 inputs is active and hence ‘1’ shall be appended to Enc-2 output
E) The final output shall be only one of the above two 4 bit codes depending on the
active input belongs to Enc-1 or Enc-2.
e) Design:
The design may be divided into 5 sections
i) Input Connections to Enc-1 and Enc-2
ii) Inter Connections between Enc-1 and Enc-2 for appropriately enabling the
encoders
iii) Appending MSB bit and multiplexing the two Enc-1 and Enc-2 outputs to final
output
iv) Connecting LEDs to Mux output
v) Generating Valid / invalid indication
1
Hence the input shall normally be ‘1’ and
10K
9
8
7
6
5
4
3
2
ensures the above.
When the connector terminals are open, then I0 10
D0 Q0
9
11 7
D1 Q1
D0 (Pin 1) will be Logic ‘1’ (Not Active).
12 6
13 D2 Q2
1 D3 15
2 D4 EO 14
When the connector terminals are short 3
4
D5
D6
GS
D7
circuited (by putting shorting link), D0 (Pin 1) 5
EI
U54
74148
will be at Logic ‘0’ (Active).
Since each of the encoders produces their own 3 bit binary code, when enabled, it
is required to output the code only from the enabled encoder and then append the
By examining MUS input lines, they are divided as ‘A” group and ‘B’ group, each
group has 4 inputs. The group is selected by A’/B select (address ) line. This select
line is driven by GS output of Enc-1. This pin is ‘0’ when the 3 bin binary output
corresponds to any of its is active. Otherwise GS output is ‘1’. So, when this GS is
10
11 D0 A0
9
7
2
5
‘0’ the Mux will select A group and
1A 1Y
4
7
12
13
1
D1
D2
D3
A1
A2
6
15
11
14 otherwise it selects the ‘B’ group inputs as
2A
3A
4A
2Y
3Y
4Y
9
12
2
3
D4
D5
EO
GS
14 3
6 Mux outputs. Hence all A group pins
1B
4 D6 10 2B
5
D7 Enc-1
VCC
13 (1A,2A,3A) are connected to Enc-1 outputs
3B
4B
EI 1
74148
15 (A0,A1,A2) and B group inputs (1B,2B,3B)
A/B
G 74LS158
5
D7 when Enc-2 outputs are selected to Mux
EI 74148
outputs. This done by connecting 4A to
GND (‘0’) ans 4B to VCC (‘1’) directly.
Futher MuX also inverts its inputs and hence MUX outputs are straight binary.
R13 4
2 4 7416
5 1A 1Y 7
11 2A 2Y 9
14 3A 3Y 12 R14
220E 5
Data 0
4A 4Y
3 U54 7416
6 1B
10 2B R15
220E 6
Data 0
13 3B 7416
4B
1
15 A/B R16
220E 7
Data 0
G 74LS158 7416
220E Data 0
VCC
GS(1)
GS(2)
f) Circuit Diagram
VCC
1
R5
10K
VCC
R9 R7
560E 220E Validity
13 U3F 12
VCC
2
3
4
5
6
7
8
9
7416
D7 D8
DIODE DIODE
I0 10
D0 A0
9 2
1A 1Y
4
11 7 5 7
I1 12 D1
D2
A1
A2
6 11 2A
3A
2Y
3Y
9
13 14 12
I2 1 D3
D4 EO
15 4A 4Y
2 14 3 U2
I3 3 D5 GS 6 1B
9
4 D6 10 2B
I4 D7
VCC
13 3B
4B
U3A U3B U53C U3D
5 U1 7416 7416 7416 7416
I5 EI 74148 1
A/B
15
I6 G 74LS158
8
I7
R1 R2 R3 R4
I8 10
D0 A0
9 220E 220E 220E 220E
11 7
I9 12 D1
D2
A1
A2
6
13
I10 1 D3
D4 EO
15
2 14
I11 3 D5
D6
GS
4
I12 D7 U4 Data 3 Data 2 Data 1 Data 0
5
I13 EI 74148
I14 VCC
I15
9
8
7
6
5
4
3
2
R6
10K
1
VCC
g) Operating Procedure:
The photograph of Kit’s front
plate is shown here. On to the
left 16 2-pin connectors are
placed into 2 groups. Top 8
(I0-I7) corresponding to (1-8)
mentioned in the text and
bottom 8 (I8-I15)
corresponding to (9-16)
mentioned in the text. When a
connector is open, then the
respective input is ‘1’. When
connector pins are shorted
using short link, then the
respective input is ‘0’.
i. When all connector are in open, the VALID LED is ON, indicating the output
is invalid.
ii. When any of the connector is shorted, Valid LED goes OFF indicating the
Output indicated by LED (0: OFF, 1: ON) is valid.
iii. Now place shorting links one more than on connector.
iv. Note that the data displayed on LEDs indicates the binary code of the
highest number of input for which the connector is shorted with shorting link.
v. Verify the binary code for each of the cases.
h) Conclusions: The design explained above is not unique. The design depends on
the chosen encoder and its functional pins. Even when CMOS Ics are employed,
74LS16 can still be employed to drive the LEDs as the 74LS16 inputs are
compatible with both TTL and CMOS. The current limiting resistors’ value
depends on the LED colour. The resistor value so chosen may vary and lower the
value higher the brightnessand vice versa. However higher the current will reduce
the LED life. Student may explore alternate design of interfacing the encoder
output sets to LEDs, instead of using MUX. Student shall study implementing the
same with 74147 instead of 74148 even though 74147 is not apt for this
experiment.
i) Viva Questions: