Sei sulla pagina 1di 72

Bui Van Hieu

MSI logic circuits


Copyright 2013, Bui Van Hieu All rights reserved
Bui Van Hieu
bvhieu@cse.hcmut.edu.vn
Department of Computer Engineering
Ho Chi Minh City University of Technology
MSI logic circuits
LOGIC DESIGN
Logic family Logic family
Memory Memory
ADC / DAC ADC / DAC
MICRO-
CONTROLLER
Content
Encoder / Decoder
Data busing
Multiplexer /
Demultiplexer
What is an encoder / decoder ?
Encoder / Encoder /
Code A Code B
Encoder /
Decoder
Encoder /
Decoder
Code A Code B
N inputs
M outputs
1 of 2
N
Decoder
1 of 2
N
Decoder
N inputs 2
N
outputs
Inputs represent a binary number
Activate only one output corresponding
N inputs 2
N
outputs
1-of-8 (3-to-8) decoder
C(MS
B)
B A O7 O6 O5 O4 O3 O2 O1 O0
0 0 0 1 1 1 1 1 1 1
0
0 0 1 1 1 1 1 1 1
0
1
0 1 0 0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
1-of-8 decoder circuit
1-of-8 decoder IC (74138)
Exercises
Determine outputs of 74xx138
E
3
=E
2
=E
1
=0 A
2
=A
1
=0 A
0
=0
E
3
=1, E
2
=E
1
=0 A
2
=0
A =A =1
3 2 1 2
A
1
=A
0
=1
74138 circuit
Problems 1
5-to-32
decoder
5-to-32
decoder
7
4
1
3
8
7
4
1
3
8
7
4
1
3
8
7
4
1
3
8
Implement
5-to-32 decoder
from four
74138s
5 inputs
32 outputs
7
4
1
3
8
7
4
1
3
8
7
4
1
3
8
7
4
1
3
8
7
4
1
3
8
7
4
1
3
8
7
4
1
3
8
7
4
1
3
8
.
.
.
74138s
7442 IC (4-to-10 decoder)
All of outputs are deactivated
if an invalid input is applied
(1010 1111)
Application example
Provide timing and sequencing operations
BCD-to-7-segment Decoder/Driver
Form the decimal characters 0 9
Each segment is a LED
Normal brightness: 10mA, 2.7V
Exercises
Determines outputs for each case
Inputs DCBA = 1001
Inputs DCBA = 0110
Inputs DCBA = 0011
Inputs DCBA = 0000
D is the most significant bit
7446/7447 BCD-to-7-segment
decoder
7446/7447 truth table
Problem 2
Implement 7446/7447 by logic gates
Encoder
The opposite of decoding process
Depend on the context, terms encoder and
decoder are interchangeable
2
N
-line-to-N-line encoder
2
N
inputs
Only one input is activated at a given time
Produces a N-bit binary code
8-to-3 encoder
A7 A6 A5 A4 A3 A2 A1 A0 O2 O1 O0
1 1 1 1 1 1 1
0
0 0 0
1 1 1 1 1 1
0
1 0 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
1 1 0 1 1 1 1 1
1 0 1 1 1 1 1 1
0 1 1 1 1 1 1 1
8-to-line encoder
More than one inputs are activated?
74147 Decimal-to-BCD Priority
Encoder
More than one input is activated, output code
respond to the highest-numbered input
Exp: A6, A2, A0 are activated output code is
110 (6)
Exercises
Determine outputs of 74147 if A
9
-A
0
inputs are
1110111111
All high except A , A , A All high except A
7
, A
5
, A
3
All low except A
9
, A
1
, A
0
Example Switch encoder
Example
3 groups
Each group
stores code of
pressed key
Magnitude comparator
Compare two input binary quantities
Generate outputs to indicate which one is
greater
7485 truth table
Exercise
Problem 3
Implement the comparator by logic gates
8-bit magnitude comparator
12, 16 bit comparator ?
Exercise
Describe operation of the 8-bit comparator for
the following cases
A
7
A
6
A
5
A
4
A
3
A
2
A
1
A
0
= 10101111
B
7
B
6
B
5
B
4
B
3
B
2
B
1
B
0
= 10110001
A
7
A
6
A
5
A
4
A
3
A
2
A
1
A
0
= 10101111
B
7
B
6
B
5
B
4
B
3
B
2
B
1
B
0
= 10101111
A
7
A
6
A
5
A
4
A
3
A
2
A
1
A
0
= 10101111
B
7
B
6
B
5
B
4
B
3
B
2
B
1
B
0
= 10101001
Application example
Code converter
Change data presented in one type of
binary code to another type of binary
code
BCD-to-7-segment BCD-to-7-segment
BCD to binary
Binary to BCD
Binary to Gray code
Gray code to binary

Content
Encoder /
Decoder
Data
busing
Multiplexer /
Demultiplexer
Multiplexers (MUX - Data
Selectors)
Select one inputs to
pass on to the output
Desired input is controlled
by SELECT inputs
Two-input multiplexer
S I1 I0 Z
0
0
0 0
0 0 1
0 1 0
Z = I
0
S + I
1
S
0 1 1
1 0 0
1 0 1
1 1
0
1
1 1 1
Four-input multiplexer
Problem 4
Implement eight-input multiplexer
with enable signal (74151)
Sixteen-input multiplexer
Quad Two-Input MUX (74157)
Application Data routing
select = 0
select = 1
Applications Parallel to serial
Applications Logic function
generation
Problem 5: combine Enable
signal to generate 4-input
logic functions
Select : input variables
Data : connect 0 or 1 (based on truth table)
Example Control system
Creativity Creativity Creativity Creativity
Demultiplexers (Data distributor)
Revert of MUX
1-to-4 demultiplexer
S1 S0 I O3 O2 O1 O0
0 0 0 0 0 0 0
0 0 1 0 0 0 1
0 1 0
1-to-4
DEMUX
1-to-4
DEMUX
I
O3
O2
O1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
DEMUX DEMUX
S1 S0
O0
1-to-8 demultiplexer
DEMUX vs. 1-to-N decoder
Application Synchronous data
transmission
Waveform
Real application examples
Content
Encoder /
Decoder
Data busing
Multiplexer /
Demultiplexer
Bus ?
Bus ?
Common connecting lines for data
transferring
Many devices connect their inputs/outputs
Device 0 Device 0 Device 1 Device 1 Device 2 Device 2
Device 3 Device 3 Device 4 Device 4
Data bus
Open collector
74173 circuit
Example
Signal sequence
t1: reg. A outputs are enabled
t2: reg. C inputs data
t3: reg. A outputs are disabled,
data bus return to Hi-Z state
Expanding bus size
Bus representation
Bidirectional busing
Review questions
Can more than one decoder output be active at
one time?
What is the function of a decoders enable
input?
Which LED segments will be on for a 7-
segment decoder input of 1001?
Which LED segments will be on for a 7-
segment decoder input of 1001?
How does a priority encoder differ from an
ordinary encoder?
What are the functions of a multiplexer ?
What are some major applications of a
multiplexer?
Problems
1 3 4 5 (7 40) 8 9
13 14 15 16
27 29 30 31 (33 34) 35 36 37
38 (all students)
39 41 43 44
45*
56 57 58 59 60 61 62
Examiner
Each group must solve all the problems
Write down the problems and solutions
Other group will comment

Potrebbero piacerti anche