ECE
171: Introduction to Digital Circuits |
Fall 1999 |
Rev: 11.11.99 |
Lecture Notes 12
Last Time
- Project Tips
- Karnaugh Maps
- More 5 & 6 Variable Examples
- Don't Cares
- Minimal Products
This Time
- Decoders and Encoders
- Multiplexers & Demultiplexers
- Sample Applications
- MUX Trees
- For Combinational Logic
- Seven Segment Displays
- Parity Error Detection
Decoders
Decoders convert compact codes
to less compact codes.
Draw a symbol for a 3-to-8
decoder.
Draw the first few lines of the truth table.
Review the data sheet for the 74138
Discuss the following:
- Note conditions to enable the
device
- The outputs are active low
- This device, like the others
will be talking about, are constructed of logic gates.
Encoders
Encoders convert many inputs into
fewer inputs.
Draw an example of an 8-to-3
encoder.
Begin drawing the truth table and note the following:
- There is a conflict when one
or more of the input lines are high. For example, how should
the decoder handle the situation when both D0 and D1 are high?
- There are more than 28
input combinations, but only 23 output combinations.
- Most encoders use a priority
scheme where they check for certain active inputs first. In the
previous example, if D1 was high, the level on D0 would be ignored.
- This is reflected in the truth
table.
Go over data sheet for 74148
devices.
Note the following:
- Inputs are active low (so this device
is compatable with the 74138).
- There are 8 inputs.
- Outputs are active low.
- Conditions for enable.
- Show how to use two 8-input encoders to
make on 16-input encoder, as shown at the end of the datasheets.
- Note that most of these devices come with
a lot of bells and whistles to make common applications, like
that, easier.
Multiplexers
Draw symbol as programmable
switch, as done in the book.
Draw a truth table using don't cares.
Draw a more compact truth table by specifying the data inputs
in the output column, as is done on the data sheets.
Go over data sheet for 74151
devices.
Multiplexers for Combinational
Logic
Show students how a multiplexer
with thre control inputs can implement any function of three variables.
Have students pick the function.
Show students trick for implementing
a function of four variables with a multiplexer that has three
control variables. Have students pick the function. Note that
this also requires the use of an inverter for the LSB.
Show how multiplexers can be
combined to make the equivalent of larger multiplexers. Specifically
draw a diagram of five 4-Input multiplexers and show how they
can be used to make the equivalent of a 16-Input multiplexer.
Demultiplexers
Draw diagram of 8-Output demultiplexer
(3 control inputs).
- This is just the opposite of
a multiplexer.
- Show how a decoder with an
enable can also be used as a multiplexer.
- Specifically review the 74138
data sheets and show how it can be used as a multiplexer.
Multiplexers and Demultiplexers
for Serial Communications
- Show how a multiplexer and
demultiplexer driven by a common counter can be used for serial
communications.
- However, with three control
inputs this requires four wires be run between the devices.
- Show how you can reduce the
number of wires by using two counters and just running the clock
signal between the devices.
- Note that the counters must
be synchronized for this to work.
Seven Segment Displays
Show Figure 7-19 (pg. 166)
from the book.
- Note that common-anode is active
low.
- Note that common cathode is
active high.
- Show the output of a logic
gate hooked up directly to a common anode segment.
- This won't work because when
the output is 0 the transistor tries to sink all the current
that it can be you can't get a sufficient voltage drop across
the diode.
- Consequently, a resistor is
always used in series with the segments.
- Show that a resistor must
also be used with common anode devices.
Parity - For Error Detection
- Parity is the number of ones
in a group of lines or outputs.
- The group is said to have odd
parity if there are an odd number of ones in the group.
- The group has even parity if
there are an even number of ones in the group.
- Draw a set of two wires used
for communications between two remote locations.
- Show how an exclusive-or
gate can be used to detect whether the there are an odd number
of ones on the set of wires.
- If the output of the exclusive-or
gate is also used for communications, then the parity of all
three wires is even.
- Draw a similar example with
three wires and two exclusive-OR gates for the parity checker.
- Note again that the parity
of all four wires (the original three plus the parity wire) always
have even parity.
- Draw a final example with
four wires and three exlcusive-OR gates.
- Note again that the parity
of all five wires is even.
- Show that the parity generator
in the transmitter is the same as the parity checker in the receiver.
- To obtain odd parity use the
same parity checkers/generators dicussed here, but invert the
output.