Recall that decoders convert
a compact code to a less compact code.
Show Figure 7-23 from the
book.
Outputs need to be active low
because the 7-segment display is a common-anode device.
The decimal point discussed
last time is not included in this discussion.
Show Figure 7-25 (Page 171)
from the book
Outputs are open collector (can
only be GND or High-Z)
As with the devices discussed
last time, there are many bells and whistles
LT' stands for lamp test and
is used to turn on all of the LED's for testing purposes
Explain how RBI controls how
the number 0 is displayed to optionally prevent leading zeros
from being displayed.
The combination of the RBI'
input and RBO' output enables these devices to be interconnected
to acheive this.
Programmable Logic Devices
PLD's are devices that can implement
a wide variety of logic functions.
The programming may be permanent
or reprogrammable.
Examples of common types of
PROM's:
ROM - (Read Only Memory) Is
programmed by the manufacturer and can not be altered by the
user (you, the engineer).
PROM -(Programmable ROM) can
be programmed once. These are programmed by frying a set of fuses
in the device that permanently break connections between wires.
Thus, these devices can not be reprogrammed.
EPROM - (Erasable PROM) can
be programmed and reprogrammed. To reprogram this device you
have to put it under ultraviolet light for an extended period
of time.
EEPROM - (Electricallly Erasable
PROM) This device can be erased electrically and is therefore
much easier and quicker to work with than a EPROM.
The other types of PLD's have
similar technologies for programming them.
Common PLD's include:
PROM's (I'll use this term generically
to include all types of PROM's)
PLA's - Programmable Array Logic.
This technology is obsolete so I will not discuss it.
PAL Devices - Programmable Array
Logic Devices. A very popular device for implementing combinational
logic, the type that we've been discussing.
GAL Devices - Gate Array Logic.
Similar to PAL Devices, but these have additional flexibility.
PGA - Programmable Gate Arrays.
These are even more flexible than GAL's.
FPGA's - Field Programmable
Gate Arrays. These devices are very elaborate and can be reprogrammed
while being in complete system.
PROM's
These are usually thought of
as a memory device
There are usually a relatively
small number of inputs, also known as address lines.
There are usually 8, 16, or
32 outputs - which is usually more than necessary for combinational
logic circuits.
The architecture is fairly rigid
which reduces the flexibility of the device.
Draw a figure similar to
Figure 7-36 from the book (Page 179)
There is a separate row for
each entry in the truth table
Each AND gate is connected to
as many lines as there are inputs
The inputs of the OR gates can
be programmed by the user
For the project, it could have
been done with an 8 inputs x 8 outputs PROM, which is available
on a 20 pin package (IC).
Note that there is no need for
a minimal sum. All you need to know is which rows in the truth
table have ones.
Show how the device can be
used to implement any set of function of the input variables
PAL Devices
Draw diagram similar to Figure
7-39 in the book.
Show how the connections
to the AND gates can be programmed to implement a wide variety
of functions.
Show Figure 7-40 in the book.
Note that there are 10 standard
inputs.
There are 8 outputs.
6 of the output pins can be
programmed to be inputs.
Each output can have high impedance
for certain input conditions.
6 of the outputs can be fed
back and serve as inputs into other gates (including the same
gate that's producing the output).
All of the wires have pull-up
resistors, even though it's not shown.
The project could have been
done with one 20-pin PAL device.
Each AND gate can be connected
to as many as 31 inputs.
PAL Devices vs. PROM's
PAL's usually have more inputs
than PROM's
Unlike PROM's, PAL's have a
limited number of product terms for each output so this limits
PAL's to only implementing a subset of all functions.
PAL's usually have fewer outputs
than PROM's.
PAL's usually have much more
flexibility than PROM's.
PAL's require minimal sums to
reduce the number of product terms - but this can be automated
in software.
Static Hazards
These are also know as a glitch
or a spike in the output.
Static 1/0 Hazard
A pair of input combinations that differ by one variable and
both produce a 1/0-Output sucht that it is possible for a momentary
0/1 to appear at the output
Example
Draw a two level AND-OR circuit
with a common input (B) going to both AND gates, one connection
through an inverter.
Draw a timing diagram to
show the glitch occurring.
Static-0 Hazards do not occur
in two-level AND-OR circuits or NAND-NAND circuits.
Similarly, Static-1 hazards
do not occur in two-level OR-AND circuits or NOR-NOR circuits.
To eliminate all potential static
1 hazards from a circuit, additional prime implicants must be
added.
These can be added systematically
to the Karnaugh maps by making sure that all adjacent 1's are
included in prime implicants that are included in the final sum.
Similarly, product of sum expressions
can be modified to eliminate static-0 hazards by eliminating
the static-1 hazards in the sum before applying DeMorgan's theorem.
Another Example
Draw the Karnaugh map for Y
= ABCD
(2,3,4,5,7,9,11,12,13,14)
Prime Implicants: 7
Distinguished 1-Cells: 3
Essential Prime Implicants:
2
Minimal Sums: 2
Show that to eliminate the
static-1 hazards all 7 prime implicants must be included in the
sum.
However, you do not always need
to include all of the prime implicants to eliminate static hazards.
Gray Code
Draw a fuel level sensor
that consists of three sensors attached to floats that ride up
or down a column. Each sensor detects whether a cell in a 8x3
array is dark or light. This is then decoded to read the fuel
level.
At half full the sensors could
read 000 or 111 and cause the driver to think the tank is entirely
full or empty.
To prevent this problem gray
code is often used.
1-Variable Gray Code
0
1
2-Variable Gray Code (Note the
reflection of the right-most column about the 2nd and 3rd rows).
00
01
11
10
3-Variable Gray Code (Note the
reflection of the right-most columns about the 4th and 5th rows).
000
001
011
010
110
111
101
100
Show how this solves the fuel
tank problem. Now at half full the sensor will only cause a discrepancy
between the two adjacent rows.
This is also used on discs to
detect shaft angle. Show Figure 7-18a in the book to illustrate the idea.