Open-Collector and Driver Gates

advertisement
EGR 278
Digital Logic Lab
File: N278L3A
Lab # 3
Open-Collector and Driver Gates
A.
Objectives
The objectives of this laboratory are to investigate:
•
the operation of open-collector gates, including the use of pull-up resistors and wireANDing.
•
the use of drivers and output transistors to provide high current levels for loads
B.
Materials
Breadboard
Tektronix P5280 DC Power Supply
Agilent 33401A Digital Multimeter
5V Power Supply
Micronta Digital Logic Probe
Fluke Digital Multimeter
12V Automobile Marker Bulb (#194)
C.
One 7400 Quad 2-input NAND IC
One 7401 Quad 2-input open-collector NAND IC
One 7406 Hex Inverter Buffer/Driver (open collector)
7400, 7401, 7406 Specification Sheets
Any PNP transistor with IC(max) >1A (such as
SK3441, NTE 292, TIP30C, or TIP42 ).
Introduction
TTL logic circuits typically have one of two types of outputs:
•
Totem-pole outputs
•
Open-collector outputs
Totem-pole outputs
This is the most common type of output for TTL devices. Figure 1a below shows the internal
circuitry of a 7400 2-input NAND. The transistors in TTL devices (denoted by Q) essentially act
like switches. When a transistor is ON it acts like a closed switch and when a transistor is OFF it
acts like an open switch. Note that transistor Q4 is stacked on top of Q3 like a totem-pole. The
output Y is taken from the top of Q3. Figure 1b shows the current path through the totem-pole
when the output is HIGH and also when it is LOW.
When the output is HIGH: Q4 is ON, Q3 if OFF, and the current IOH flows through Q4 and
out Y. Note that IOH = 0.4 mA maximum.
When the output is LOW: Q4 is OFF, Q3 if ON, and the current IOL flows in Y and through
Q3 to ground. Note that IOL = 1.6 mA maximum.
Figure 1A - 7400 NAND circuit
Figure 1B - current paths
Page 2
Open-collector outputs
TTL circuits with open-collector outputs have only the lower transistor (Q3) seen in the previous
totem-pole output. Since there is no internal path from the output Y to the supply voltage VCC ,
the circuit does not function properly unless an external pull-up resistor is used. . Figure 2a
below shows the internal circuitry of a 7401 open-collector 2-input NAND. Figure 2b shows a
7401 NAND with an external pull-up resistor attached.
VCC
RP
Y (output)
Figure 2b - 7401 NAND with pull-up resistor
Figure 2a - 7401 open-collector NAND
Note that a special symbol is shown inside the NAND gate shown above. Open-collector gates
are not always denoted with special symbols, but they may be indicated using one of the four
symbols shown in Figure 3 below.
*
OC
Figure 3 - Symbols for open-collector gates
Why should we use open-collector gates which require the addition of a pull-up resistor in order
to function properly when we could use a gate with a totem-pole output instead? There are
several reasons:
1) Wired-ANDing - Open-collector outputs can be tied directly together which results in the
logical ANDing of the outputs. Thus the equivalent of an AND gate can be formed by
simply connecting the outputs. This is especially convenient when large numbers of signals
need to be ANDed.
2) Increased current levels - Standard TTL gates with totem-pole outputs can only provide a
HIGH current output of 0.4 mA and a LOW current of 1.6 mA. Many open-collector gates
have increased current ratings.
3) Different voltage levels - A wide variety of output HIGH voltages can be achieved using
open-collector gates. This is useful in interfacing different logic families that have different
voltage and current level requirements.
Page 3
Wired-ANDing
If TTL gates with totem-pole outputs have their outputs tied together, the gates may be
destroyed.. This is illustrated below in Figure 5 where the top gate has a HIGH output and lower
gate has a LOW output.
V CC
I
130
Q4
ON
D3
Y (output of gate #1)
HIGH
Q3
OFF
V CC
(outputs of the 2 gates connected)
130
I > 16 mA (resulting in destruction)
Q4
OFF
D3
LOW
Y (output of gate #2)
Q3
ON
Figure 4 - The destruction of totem-pole gates if their outputs are tied together
When open-collector gates have their outputs tied together the result is that the outputs are
ANDed together. This is illustrated with two examples in Figure 5 below.
VCC
VCC
IP
IP
RP
LOW
RP
HIGH
HIGH
LOW
HIGH
HIGH
HIGH
LOW HIGH HIGH = LOW
HIGH HIGH HIGH = HIGH
Figure 5 - Examples of wired-ANDing using open-collector gates
HIGH
Page 4
Pull-up resistor calculation
Pull-up resistors are typically in the range of several hundred ohms to several thousand ohms, but
exact ranges can be calculated using the relationships shown in Figures 6 and 7 below.
Case 1: All input gates OFF (ANDed result is HIGH)
Used to calculate RP(max)
VCC
I
P
RP
OFF
OFF
OFF
OFF
I
I
I
I
Calculation for RP(max):
VCC - VOH (min)
R P (max) =
M(I OH ) + N(I IH )
implied wired-AND operation
I
OH
I
OH
I
OH
IH
IH
Example: Using M = 4 and N = 3 as
shown on the left and using standard
TTL specifications:
5 - 2.4
R P (max) =
4(250 µA) + 3(40µA )
R P (max) = 2321 Ω
IH
N = 3 loads
OH
M = 4 input gates
Figure 6 - Calculating the maximum pull-up resistor value
Case 2: At least one input gates is ON (ANDed result is LOW)
Used to calculate RP(min)
VCC
I
P
RP
ON
I
Calculation for RP(min):
VCC - VOL (max)
R P (min) =
I OL (max) - N(I IL )
OL
OFF
OFF
implied wired-AND operation
I
I
I
IL
IL
Example: Using M = 4 and N = 3 as
shown on the left and using standard
TTL specifications:
5 - 0.4
R P (min) =
16mA - 3(1.6mA )
R P (min) = 410 Ω
IL
OFF
N = 3 loads
M = 4 input gates
Figure 7 - Calculating the minimum pull-up resistor value
Page 5
Open-collector drivers
Some open-collector gates are particularly well suited to driving loads that require higher voltage
and current levels, such as incandescent lamps and relays. An example is the 7406 Hex Inverter
Buffer/Driver. This gate is similar to the 7404 Hex Inverter (totem-pole output) except that IOL
(max) = 40 mA (instead of 16 mA) and VOH(max) = 30 V (instead of around 5V).
An example is shown in Figure 8 below where the output of a 7406 is used to drive an
incandescent lamp that requires a 12 V supply and about 35 mA of current. Note that a currentlimiting resistor Rlimit may or may not be necessary, depending on the resistance of the lamp
filament.
12 V
R limit
bulb
Figure 8 - 7406 driving an incandescent lamp
The 7406 allows us to drive loads that require up to 40 mA of current. For even larger currents, it
may be necessary to use an output transistor. Transistors are available that can provide currents
of several amperes. An example is shown in Figure 9
12 V
C
B
E
bulb
Figure 9 - Using an output transistor to provide output currents up to several amperes
Page 6
D.
Preliminary Work
1.
Calculate minimum and maximum values for pull-up resistors under the following
conditions. Use specifications for the 7401 (assume that VOH(min) = 2.4V). Tabulate your
results. Show a sample calculation for one case.
M (# inputs)
1
1
1
3
3
2.
3.
N (# outputs)
0
1
3
1
3
Present a documented circuit layout only for Circuit 4B in the Laboratory Work section.
Generate a truth table for the circuit shown in Figure 10 below where the outputs of the
open-collector gates are wired-ANDed together. In other words, simply generate the truth
table
for F = A • B • C .
V
CC
R
A
A
B
B
C
C
P
F= A B C
Figure 10
Page 7
E.
Laboratory Work
1.
Open-collector gate without a pull-up resistor
Connect a 7401 open-collector NAND with its inputs tied together (to act as an inverter)
and with no load and no pull-up resistor as shown in Circuit 1. Measure the output with a
voltmeter for both HIGH and LOW inputs. Are the output voltages within specified
ranges? (They should not be!)
A
Y (output)
Circuit 1
Input Switch A
L
H
2.
Output Voltage
Specified Voltage
Within specs?
Open-collector gate with a pull-up resistor
Connect a 7401 open-collector NAND with its inputs tied together (to act as an inverter)
and with no load using a pull-up resistor as shown in Circuit 2. Use a pull-up resistor that is
within the range calculated in Section D. Record the value of resistance used. Measure the
output with a voltmeter for both HIGH and LOW inputs. Are the output voltages within
specified ranges? (They should be!)
Vcc
Rp
A
Y (output)
Circuit 2
Input Switch A
L
H
Output Voltage
Specified Voltage
Within specs?
Page 8
3.
Using a wired-AND configuration with totem-pole outputs
Connect Circuit 3 using a 7400 NAND for only 2 or 3 seconds (or the gates may be
destroyed) and record the output voltage and current. Is the current within specified limits
for a LOW output?
Ammeter
HIGH
LOW
Voltmeter
Circuit 3
4.
Using a wired-AND configuration with open-collector outputs
A) Connect Circuit 4A using a 7401 open-collector NAND using a pull-up resistor that is
within the range calculated in Section D. Record the value of resistance used.
Record the output voltage and current. Are the current and voltage within specified
limits for a LOW output? Why is the output LOW and not HIGH?
V
CC
R
P
Ammeter
HIGH
LOW
Voltmeter
Circuit 4A
Page 9
B)
Connect Circuit 4B using a pull-up resistor that is within the range calculated in
Section C. Record the value of resistance used. Note that the gates on the left are
7401 open-collector NANDs and the gates on the right are 7400 NANDs. Verify the
truth table determined in Section D (i.e., determine the logic level of the output for all
possible input switch combinations – add an LED and a current-limiting resistor to
show when the output is HIGH or LOW). Are the outputs of the open-collector gates
ANDed together as predicted?
V
CC
R
P
Switch A
Switch B
Switch C
Circuit 4B
5.
Driving an incandescent lamp using an output transistor
Connect Circuit 5. For which switch position does the lamp light? Measure and record the
current delivered to the lamp for both input switch positions as well as the current and
voltage at the output of the 7406. Compare the current measured to the lamp when it is lit
to the max specified current for both the 7401 and the 7406. Was the transistor necessary?
Also compare the output voltage of the 7406 with standard TTL voltage levels.
12 V
E
Io
Switch
B
'06
SK3341 PNP BJT
TIP 30
C
2.2k
#194 12V auto
marker light
bulb
Ibulb
B C E
TIP 30 Pin Assignment
Circuit 4
Circuit 5
Page 10
F.
Report
1.
2.
3.
4.
5.
Present all measured data from the Laboratory Work clearly and concisely. Discuss the
results.
Use tables whenever possible to compare measured values to specified values.
Discuss any values that do not fall within specified limits and suggest reasons for the
discrepancies.
Compare gates with totem-pole outputs and gates with open-collector outputs. How are
they different?
Discuss the issue of output current. Compare the output current levels (particularly
IOL(max) ) for a 7400, 7406, and an output driver transistor.
Download