0% found this document useful (0 votes)
39 views14 pages

Encoders Circuit

This document discusses different types of encoders, including 4-to-2 encoders, 8-to-3 encoders, priority encoders, and TTL encoders. It provides examples of truth tables and equations for encoders. It also briefly describes using a 74148 encoder chip as part of the interrupt logic for a 68000 microprocessor.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views14 pages

Encoders Circuit

This document discusses different types of encoders, including 4-to-2 encoders, 8-to-3 encoders, priority encoders, and TTL encoders. It provides examples of truth tables and equations for encoders. It also briefly describes using a 74148 encoder chip as part of the interrupt logic for a 68000 microprocessor.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 14

Encoders

Lecture L6.11
Section 6.3
Encoders
• Encoders
• Priority Encoders
• TTL Encoders
Encoders

I0 I0 I1 I2 I3 B A
I1 4-to-2 A
Encoder 1 0 0 0 0 0
I2 B 0 1 0 0 0 1
I3 0 0 1 0 1 0
0 0 0 1 1 1
Encoders
Assume only 1 input
can be high at any time. I0 I1 I2 I3 B A
1 0 0 0 0 0
A = I1 # I3 0 1 0 0 0 1
B = I2 # I3 0 0 1 0 1 0
I0 0 0 0 1 1 1
I1
A = I1 # I3

I2
I3 B = I2 # I3
8-to-3 Encoder
I0 I1 I2 I3 I4 I5 I6 I7 Y2 Y1 Y0
1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 1 0 0
0 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 1 1 1
Y2 = I7 # I6 # I5 # I4
Y1 = I7 # I6 # I3 # I2
Y0 = I7 # I5 # I3 # I1
encoder.abl
MODULE encoder83
TITLE 'Encoder, D. Hanna, 7/15/02'
DECLARATIONS
" INPUT PINS "
I7..I0 PIN 11, 7, 6, 5, 4, 3, 2, 1; " Switch 1..8
" OUTPUT PINS "
Y2..Y0 PIN 41, 43, 44 ISTYPE 'com'; " LED 14..16
I0 I1 I2 I3 I4 I5 I6 I7 Y2 Y1 Y0
EQUATIONS 1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
Y2 = I7 # I6 # I5 # I4; 0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 1 0 0
Y1 = I7 # I6 # I3 # I2; 0 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
Y0 = I7 # I5 # I3 # I1; 0 0 0 0 0 0 0 1 1 1 1
END encoder83 Y2 = I7 # I6 # I5 # I4
Y1 = I7 # I6 # I3 # I2
Y0 = I7 # I5 # I3 # I1
Priority Encoder
I0 I1 I2 I3 I4 I5 I6 I7 Y2 Y1 Y0
1 0 0 0 0 0 0 0 0 0 0
X 1 0 0 0 0 0 0 0 0 1
X X 1 0 0 0 0 0 0 1 0
X X X 1 0 0 0 0 0 1 1
X X X X 1 0 0 0 1 0 0
X X X X X 1 0 0 1 0 1
X X X X X X 1 0 1 1 0
X X X X X X X 1 1 1 1
Priority Encoder
I0 I1 I2 I3 I4 I5 I6 I7 Y2 Y1 Y0
1 0 0 0 0 0 0 0 0 0 0
X 1 0 0 0 0 0 0 0 0 1
X X 1 0 0 0 0 0 0 1 0 Y2 = L7
X X X 1 0 0 0 0 0 1 1 # L6
X X X X 1 0 0 0 1 0 0
X X X X X 1 0 0 1 0 1 # L5
X X X X X X 1 0 1 1 0 # L4
X X X X X X X 1 1 1 1

L7 = I7
L6 = !I7 & I6
L5 = !I7 & !I6 & I5
L4 = !I7 & !I6 & !I5 & I4
Priority Encoder
I0 I1 I2 I3 I4 I5 I6 I7 Y2 Y1 Y0
1 0 0 0 0 0 0 0 0 0 0
X 1 0 0 0 0 0 0 0 0 1
X X 1 0 0 0 0 0 0 1 0 Y1 = L7
X X X 1 0 0 0 0 0 1 1 # L6
X X X X 1 0 0 0 1 0 0
X X X X X 1 0 0 1 0 1 # L3
X X X X X X 1 0 1 1 0 # L2
X X X X X X X 1 1 1 1

L7 = I7
L6 = !I7 & I6
L3 = !I7 & !I6 & !I5 & !I4 & I3
L2 = !I7 & !I6 & !I5 & !I4 & !I3 & I2
Priority Encoder
I0 I1 I2 I3 I4 I5 I6 I7 Y2 Y1 Y0
1 0 0 0 0 0 0 0 0 0 0
X 1 0 0 0 0 0 0 0 0 1
X X 1 0 0 0 0 0 0 1 0 Y0 = L7
X X X 1 0 0 0 0 0 1 1 # L5
X X X X 1 0 0 0 1 0 0
X X X X X 1 0 0 1 0 1 # L3
X X X X X X 1 0 1 1 0 # L1
X X X X X X X 1 1 1 1

L7 = I7
L5 = !I7 & !I6 & I5
L3 = !I7 & !I6 & !I5 & !I4 & I3
L1 = !I7 & !I6 & !I5 & !I4 & !I3 & !I2 & I1
pencoder.abl
MODULE pencoder83
TITLE 'Priority Encoder'
DECLARATIONS
" INPUT PINS "
I0..I7 PIN 11, 7, 6, 5, 4, 3, 2, 1; " Switch 1..8
" OUTPUT PINS "
Y2..Y0 PIN 41, 43, 44 ISTYPE 'com'; " LED 14..16
VALID PIN 35; " LED 9
" VALID = 1 for valid binary output
pencoder.abl (cont’d)
I0 I1 I2 I3 I4 I5 I6 I7 Y2 Y1 Y0
" Definitions "
1 0 0 0 0 0 0 0 0 0 0
L7 = I7; X 1 0 0 0 0 0 0 0 0 1
X X 1 0 0 0 0 0 0 1 0
L6 = !I7 & I6; X X X 1 0 0 0 0 0 1 1
X X X X 1 0 0 0 1 0 0
L5 = !I7 & !I6 & I5; X X X X X 1 0 0 1 0 1
L4 = !I7 & !I6 & !I5 & I4; X X X X X X 1 0 1 1 0
X X X X X X X 1 1 1 1
L3 = !I7 & !I6 & !I5 & !I4 & I3;
L2 = !I7 & !I6 & !I5 & !I4 & !I3 & I2;
L1 = !I7 & !I6 & !I5 & !I4 & !I3 & !I2 & I1;
EQUATIONS
Y2 = L7 # L6 # L5 # L4;
Y1 = L7 # L6 # L3 # L2;
Y0 = L7 # L5 # L3 # L1;
END pencoder83
TTL Encoder
EI 0 1 2 3 4 5 6 7 A2 A1 A0 GS EO
1 16
4 Vcc
2 15 1 X X X X X X X X 1 1 1 1 1
5 E0 0 1 1 1 1 1 1 1 1 1 1 1 1 0
3 14
6 GS 0 X X X X X X X 0 0 0 0 0 1
4 13 0 X X X X X X 0 1 0 0 1 0 1
7 3
5 12 0 X X X X X 0 1 1 0 1 0 0 1
E1 2
6
A2 1
11 0 X X X X 0 1 1 1 0 1 1 0 1
7 10 0 X X X 0 1 1 1 1 1 0 0 0 1
A1 0
8 0 X X 0 1 1 1 1 1 1 0 1 0 1
GND A0 9
0 X 0 1 1 1 1 1 1 1 1 0 0 1
74LS148 0 0 1 1 1 1 1 1 1 1 1 1 0 1

Priority Encoder
68000 Interrupt Logic
A0
74138 A1
Decoder A2

68000
IRQA

74148 IP0
Encoder IP1
IRQ
Peripheral IP2

Data Bus

You might also like