




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Logic Circuit LabECE 241
Lab #3; Page 1/
Fall 2007
to 0V and the high logic level is assigned to 5V. (See pages 98–101 ofetc.) In a popular logic family called TTL (Transistor-Transistor Logic), the low logic level is assigned In a digital system there are only two stable states, logic 1 and 0 (or HIGH and LOW, TRUE and FALSE,
Logic and Computer Design
Fundamentals
by Mano and Kime for more information.) Each logic gate is actually implemented in
outlines can easily fit together.The IEEE symbols are better suited to represent ICs than the distinctive symbols since their rectangularcontains 6 inverters. The IEEE standard logic symbols for each of these devices is shown in Figure 1.Similarly the 7432 chip is a “Quad 2 input OR” chip while the 7404 chip is a “Hex Inverter” since itimplements 4 two input AND gates and is commonly referred to as a “Quad two input AND” chip.between individual gates. Usually each IC package contains several individual gates. The 7408 chipdo not need to concern ourselves with the actual circuitry inside each gate, only the interconnectionspart of an integrated circuit (IC), with each gate made using several transistors. For the most part we
(13)(12)(10)(9)(5)(4)(2)(1)
(11) (8) (6) (3)
4Y 3Y 2Y 1Y
4B4A3B3A2B2A1B1A
(13)(12)(10)(9)(5)(4)(2)(1)
(11) (8) (6) (3)
4Y 3Y 2Y 1Y
4B4A3B3A2B2A1B1A
(13)(11)(9)(5)(3)(1)
(12)(10)(8)(6)(4)(2)
6Y5Y4Y3Y2Y1Y
6A5A4A3A2A1A
1
≥ 1
&
7408
7432
7404
positive logic: Y=AB
positive logic: Y=A+B
positive logic: Y=A
Figure 1: Standard Logic Symbols
or indented dot placed just next to it.chip that is visible when the chip is viewed from the top. Occasionally, it is also identified by a printedin Figure 2. Pin 1 is usually identified as the pin to the left of an indentation or cutout in one end of theassigned to each logic signal are shown inside brackets in the figure. The pins are numbered as shown Each of the chips in Figure 1 are available in 14 pin Dual-In-Line packages or DIPs. The pin numbers
Logic Circuit Lab ECE 241
Lab #3; Page 2/
Fall 2007
7 6 5 4 32 1
8 9
1011121314
Figure 2: Identifying Pin 1
You will notice that pins 7 and 14 are not referenced in the logic diagrams. In 14 pin DIP packages,
pin 7 is
usually connected to ground (Gnd), and pin 14 is
usually
1
connected to the 5V power supply
While TTL circuits are fairly forgiving, they can be destroyed by wiring mistakes.(Vcc). These connections must be made or the chip will not work. TTL logic circuits are not passive!
Take care not to
together, and even in these cases, care must be taken.Only open collector and Tri-state gates are designed to operate with outputs of several gates connectedconnect pin 7 to power and pin 14 to ground, or to connect the outputs of two or more gates together.
A complete logic diagram including pin numbers using the 7408 and 7432 chips can be drawn as is
done in either of Figure 3 or Figure 4,
(2)(1)
(3)
(2)(1)
(3)
Figure 3: A Logic Diagram Using Distinctive Symbols
(2)(1)
(3)
(2)(1)
(3)
≥
1
&
Figure 4: A Logic Diagram Using IEEE Standard Symbols
Notice that even though there are four AND gates on each IC, only the gates used are shown, and
found on. A wiring diagram for this circuit is given in Figure 5.each gate is drawn separately. The U (unit) numbers can be used to identify which chip each gate is
The only diagrams you will need to make for this lab are the logic diagrams with part and pin numbers
also give the chip and pin numbers which facilitate circuit implementation, testing and debugging.as in Figure 3 or Figure 4. They clearly convey how the circuit is intended to work logically, and they
1 Occasionally, different pins are used, so be sure to check the chip’s pinout information in a databook before making any
connections.
Logic Circuit LabECE 241
Lab #3; Page 3/
Fall 2007
7 6 5 4 3 2 1
8 9
1011121314
7 6 5 4 3 2 1
8 9
1011121314
Vcc
Gnd
Figure 5: A Wiring Diagram
(.1 inch) apart from each other, which is the standard spacing of the pins on a DIP package.of .22 or .24 gauge wires with 1/4” of insulation stripped from both ends. The holes are spaced 100 milsremaining four holes will be connected to that lead. Nodes can be connected to each other using jumpersin Figure 7. When a component lead is inserted into one of the holes, anything inserted into one of theeasily be inserted. Rows of five or six holes are electronically connected to form a single node as shownCircuit Board (PCB). A breadboard consists of an array of holes in which wires or component leads cancreate an experimental or prototype circuit without having to design and manufacture a costly Printedcircuit is constructed on the breadboard section of the Digilab board. A breadboard is used to rapidly Figure 6 shows how the circuit in Figure 5 can be implemented on a Digilab prototyping board. The
The breadboard has a groove down the center separating one side from the other. When inserting a
in Figure 8.of the chip will be connected. Press the chip down until it touches the surface of the breadboard as shownchip into the breadboard make sure it straddles the central groove, otherwise the pins on opposite sides
Devices inserted on the breadboard can be connected to components on the Digilab board by using
for each input combination.inputs are switched through all possible combinations, and comparing the output with the desired output After a circuit is constructed it needs to be tested. This is usually done by observing the output as the
You will know a circuit doesn’t work properly when it gives the wrong
output for a particular combination of inputs. The process of fixing problems in a logic circuit is called
Logic Circuit Lab ECE 241
Lab #3; Page 4/
Fall 2007
8dip
16 dip 20 dip
14 dip
20 dip 20 dip
8dip
8dip
Y
GNDGNDGNDGNDGNDGNDGNDBN2PBN2SBN1PBN1SPINTPWEPDSPASPD7PD6PD5PD4PD3PD2PD1PD0O5O4O3O2O1CLK2VDDVDDVDDVDDVDDVDDVDD
CBCA CDCC CFCE CG A4A3A2A1DP
SW8SW7SW6SW5SW4SW3SW2SW BTN4BTN3BTN2BTN LDG LD8LD7LD6LD5LD4LD3LD2LD
AUD2AUD1AUDC
PWE PASPD7PD6PD5PD4PD4PD2PD1PD PINT PRS PWT PDS GND
PS2DPS2CTXDRXDVSHSBGRO3O2O1GNDGND
SW8 SW7 SW6 SW5 SW4 SW3 SW2 SW LD8 LD7 LD6 LD5 LD4 LD3 LD2 LD1 BTN4 BTN3 BTN2 BTN
(c) CSCOLE 2000
RP
RP
RP
RP
DSP2 DSP
RP
RP
C4 C3 C2 C
RP
U
C
R
RP
RP
C
U
BN
BN
J
J
J
J
J
U U
U
U
U
U
U
U
J J
J
LD
J
J
J
PORT PROG
VDD
GND
CLK
DONE
DIN
PRG
INT
R
SW
RP
RP
C
R
C
C C
C
C
R
D1R3 D
C
R4D3R
C
C
C15 C
C
C
C19 C
C
C
C
C
C
R6 R
R
R
C
J
U U
F Z X
Figure 6: Implementation of a Circuit on a Digilab board
Logic Circuit LabECE 241
Lab #3; Page 7/
Fall 2007
both pins 1 and 2 should also be high. If the probe shows that they are, then itis low, we next check the gate inputs at pins 1 and 2 of U2. If pin 3 of U2 is supposed to be high,connection between pin 3 and the LED is broken). Assuming that the probe shows that pin 3 of U2it really is low and that the LED is not just giving a false indication (maybe it is burned out or thean LED to which it is connected. First check pin 3 of U2 with the logic probe to make sure thatnation of inputs, the output at pin 3 of U2 is supposed to be high, but is in fact low as indicated bypoint with the logic probe. For example, consider Figure 3. Assume that, for a particular combi-
appears that the
back through the circuit, until a bad gate or a bad connection is identified.next step is to check the gate output that is connected to this input. Continue this process, workingby indicating neither high nor low. Or it may show that one input is in fact low. In this case thegate is bad. However, the probe may show that one or both inputs are not connected to anything
the logic function it is supposed to implement, there are a number of things to consider.
(a) The pins you thought were input pins may not be. Check the pin numbers for the inputs and
output in the TTL databook. Also check that you properly identified pin one on the chip.
(b) You may have the wrong chip. If you had used a 7400 instead of a 7408 for U2, the output at
the lab can also help you identify chips that have illegible or indecipherable numbers.pin 3 should be low if both pins 1 and 2 are high. Check the chip number. The chip tester in
(c) It may be that the output is being held at the incorrect voltage level by a bad connection. Con-
chips whose gate outputs you have connected together.connection. Since this situation can physically damage chips, you should probably test anydentally connected two outputs together and you should trace down and correct the offendingwith the logic probe. If the probe shows a high or low value on any wire, then you have acci-to the output of the gate you suspect to be bad. Then test the end of each disconnected wirewin this tug of war. To test for this situation, disconnect any wires that are directly connectedbe attempting drive the output low. One gate will be stronger than the other and effectivelyOne gate may be attempting to drive the output to a high voltage level while the other maysider what can happen if the outputs of two logic gates are accidentally connected together.
(d) The gate may in fact be bad. Turn the power off, remove the chip from the circuit and place
This situation needs to be corrected before the chip is placed back in the circuit.that shows a high or low value indicates a point where two outputs were connected together.check the points in the circuit that were originally connected to the chip outputs. Any pointin your circuit. With the chip still out of the circuit, turn the power back on in the circuit andit in the tester. If the chip tests bad (and even if it tests good) you should not simply replace it
back and check your work.
Logic Circuit Lab ECE 241
Lab #3; Page 8/
Fall 2007
temperatures. We notice that the actual range of output voltages appears to be from 0the steady state output of a 7404 inverter gate as a function of the input voltage at several operating Earlier, we assumed that the high voltage in TTL is 5V and the low voltage is 0V. Figure 9 shows
to 3
. We
Vin
Vout
Vin
Vout
0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.
0.00.51.01.52.02.53.03.54.
T=-55ºC
T=125ºC
T=25ºC
Figure 9: 7404 Inverter Transfer Function
notice that, independent of temperature, if
in
out
will be 0
so we can safely assume that the
gate will interpret an input voltage greater than 2
as a high voltage. Similarly, Figure 9 shows that an
input voltage less than 0
will reliably be seen as a low voltage. These two values are presented in
Figure 10 as
IH
min
(V Input High min) and
IL
max
(V Input Low max). Each individual circuit will
each gate input is either greater thanhave slightly different characteristics, but the designers of TTL circuits guarantee that if the voltage on
IH
min
or less than
IL
max
, then the voltage on the gate output will
never be less than 2
OH
min
) for high output or never greater than 0
OL
max
) for low output.
Typically, output voltages will be nearer the values of 3
and 0
Note that
OH
min
is greater than
IH
min
In other words, a TTL output produces a high voltage
greater than that required by another TTL input. The difference between the two values, called the
noise
margin, is 0
. The same margin exists for the low voltages. Thus, a line connecting a TTL gate output
to a TTL gate input can tolerate up to 0
of noise added to or subtracted from the signal without causing
important to have such noise margins.the input gate to misinterpret the intended logic. Since noise is always present in electrical systems, it is
Logic Circuit LabECE 241
Lab #3; Page 9/
Fall 2007
VIL max VIH min
VOL typVOL max VOHmin VOHtyp
TTL output
TTL input
noise margin noise margin
noise
Figure 10: TTL Voltage Levels
I when it changes from high to low, or from low to high. Each gate output can source a current up toEach gate input connected to a given output represents an additional load that the output must overcome Logic gates also have constraints on the number of individual gate inputs connected to each gate output. OH
max
when its output is high.
Each gate input can sink a current up to
IH
max
when its input is
( high. From Figure 11 and Kirchoff’s current law, we can determine that the maximum number of inputs n
) an output can drive to a high voltage is given by the equation
OH
max
IH
max
. Similarly, we can
is the maximumdetermine the maximum number of inputs an output can drive low. The smaller of these two numbers
fanout of a device. For standard TTL logic gates, both these ratios are 20 so each TTL
output should be connected to no more than 20 other inputs.
3
Real logic gates also have
propagation delay, that is there is a delay between a change in an input of
an Inverter and defines how propagation delay is measured. Since no voltage level can change instanta-a logic gate and a resulting change in the output of the gate. Figure 12 shows propagation delays for
3 In standard TTL,
I OH
max
=
400
μA
, I IH
max
=
20
μA
,
I OL
max
=
8 mA
and
I IL
max
=
0 . 4 mA
.
Logic Circuit Lab ECE 241
Lab #3; Page 10/
Fall 2007
n
I OH
I IH
I IH
n
I OL
I IL
I IL
n = min(
max
maxmax
max
Figure 11: Fanout
t neously, the input and output voltage waveforms in Figure 12 are shown with finite rise and fall times. PLH
represents the low to high propagation delay and
t PHL
represents the high to low propagation delay.
logic levels as the voltages drop below 0The timing diagram in Figure 12 shows how the voltages correspond to logic levels. Rather than switch
and rise above 2
, the switching takes place at 1
times are generally quite short.halfway between the typical high and low values. This is not a bad approximation since rise and fall
Table 1 shows the propagation delays for the different styles of 04 type TTL inverters. The “S” and
t PLH
ns
t PHL
ns
typ
max
typ
max
Table 1: Propagation Delays for 04 TTL Inverters
The effect of propagation delay on circuits is analyzed by means of timing diagrams.
Being able to
construct them is a critical skill that anyone who wishes to design digital circuits must have. Figure 13
Logic Circuit LabECE 241
Lab #3; Page 13/
Fall 2007
1min
on off
100%
0%
12s
10min
1min
Transmitted command
on off
Received command
speedMotor
Figure 14: Delay Models
that prevents an output voltage from changing instantaneously.
(a) Complete the following voltage level and logic level timing diagrams for the output of a
TTL inverter. Assume that the output of the gate only
begins to change at the point in time
that the input crosses the 1
threshold. Since it is an inverter, whenever the input rises
above the logic threshold, the output should
begin to fall. Whenever the input falls below the
logic threshold, the output should
begin to rise. The rate of output voltage change should be
t P
where
t P
represents the propagation delay of the device.
Logic Circuit Lab ECE 241
Lab #3; Page 14/
Fall 2007
tp
tp
tp
1.5V3.0V
0V
1.5V3.0V
0V
timing diagramLogic level timing diagramVoltage level
pwin
pwout
What happened to the output when the input was asserted (above the 1
threshold) for a
period just equal to
t P
when we use the above model? What would happen to the output if
the input were to be asserted for a period of time less than
t P
?
(b) Now,
assume that the inverter is a pure delay device. That is, assume that it simply inverts
the input logic and imposes a
t P
pure delay (i.e.: pure time shift) on the output. We could
model such a device by assuming it is constructed by connecting
t P /
10
−
9
feet of wire to the
output of an inverter with
zero propagation delay
4
. Add a line to the above logic level timing
device.diagram showing what the logic output would look like if the inverter behaved as a pure delay
n
represents the number of inverters in the circuit. Using an inertial delay
model for all gates, construct two logic timing diagrams for the circuit. In one assume
n
other assume
n
ns
propagation delays and that the NAND
gate has a 12
ns
propagation delay. Start the timing diagrams with
high (assume that
has been
high for a long time), then let
go low for 40
ns
and then high again.
A
F
n
4 The pure propagation delay of an electrical signal in wire is about 1
ns
per foot.
Logic Circuit LabECE 241
Lab #3; Page 15/
Fall 2007
In this lab we will investigate the effect of fanout upon dc and ac behavior.
n
is the number of inverter inputs
connected or disconnected to varyconnected to the output of a single inverter. The dashed lines represent jumper wires which can be
n
.
Start with none of the dashed wires connected. Connect one
OUT
IN
nc nc nc
n
Figure 15: Schematic of Fanout Circuit
GND
GND
VDD
VDD
VDD
OUT
GND
74x
74x
74x
IN
J
J
J
Figure 16: Fanout Experiment Setup
Record the voltages at OUT with both High and Low input signals for each configuration:on the multimeter to measure volts.) Record your observations and include them in your lab report.the multimeter to your OUT signal on the Digilab board. Make sure that the ‘V’ switch is pressed“banana clips” to connect COMMON on the multimeter to GND on the Digilab board and V onof the switches to IN. Use a multimeter to measure the voltage from GND to OUT. (To do this use
Logic Circuit Lab ECE 241
Lab #3; Page 16/
Fall 2007
(a) No jumpers connected; zero fanout. (b) J1 connected; fanout of 5. (c) J1 and J2 connected; fanout of 11. (d) J1, J2, and J3 connected; fanout of 17.
What can you conclude from your recorded voltages?
an output inverter, under (a) fanout of 5, and (b) fanout of 17.oscilloscope to measure the propagation delay from the input of the input inverter to the output of