EC312 – SX-02 –Logic Gates and Transistors

advertisement
I. Purpose
EC312 – SX-02 –Logic Gates and Transistors
This lab will provide a hands-on familiarity with the hardware building blocks of computing –
transistors and logic chips. Here you will examine several logic chips and discover which logic
functions they implement. The chips you will use are from the transistor-transistor logic (TTL)
family. First introduced in the early 1960s by Texas Instruments, TTL chips are now made by
many manufacturers and used today as “glue logic” or to implement simple circuits where a
custom chip would be overkill.
II. Equipment
You will use a Digi Designer board, wires of various lengths (for connecting chips on the Digi
Designer board), and the following TTL chips:
• 7400
• 7404
• 7432
NOTE: The chips you will use may be labeled something like “SN74LS00” or “74HC32”. The
extra letters indicate the manufacturer and/or the kind of technology used to build the chip. For
this lab, ignore the letters and simply use the numbers to select chips.
Each TTL chip must be connected to a +5 V power source and ground. The lab diagrams show
the chip pins that should be connected power and ground. The diagrams also show which pins
are inputs and outputs. Inputs will be connected to switches or pins on other chips and the
outputs will be connected to the LEDs on the Digi Designer board.
CAUTION: TTL chips are sensitive to static electricity. Before handling them, ground yourself
by touching a piece of metal such as a pipe, power supply case, etc.
III. Lab Procedure
1. Your Digi Designer board has a built-in 5V power supply. Plug in your Digi Designer board
and turn it on.
2. The pins on the TTL chips match the spacing of the holes on the Digi Designer’s breadboard.
The breadboard is the white object in the center of the Digi Designer.
Figure 1 shows how the holes on a breadboard are connected.
Side busses connected
in groups of 25
Each column of five
are connected
No connections across the Middle Bar
Figure 1. Breadboard connections.
Side Busses
EC312 – SX-02 –Logic Gates and Transistors
3. Place a 7400 chip on the breadboard of your Digi Designer and wire it as shown in Figure 2.
Pins are referenced relative to the notch on the chip. The chip should straddle the Middle Bar.
The 7400 chip implements one of the logic gates we’ve learned about, and your job is to
determine which one it is. For your inputs to the logic gate, you will use two of the “Logic
Switches” in the bottom section of your Digi Designer (wiring them to pin 1 and 2 on the TTL
chip). For your output, use one of the LED Lamp Monitors at thte top of your Digi Designer.
Switch #1
1
14
Switch #2
2
13
LED
3
12
4
GND
7400
Notch in
chip
+5V
11
5
10
6
9
7
8
Figure 2. Pin connections for the 7400 chip.
4. Go through all four possible switch combinations and record the status of the output LED in
the table on question 1 of your solution sheet. Based on those answers, determine the logic
function implemented by the 7400 (question 2).
5. Add a 7404 chip to the Digi Designer board and wire it to the 7400 chip as shown in Figure 3.
1
14
2
13
12
3
12
11
4
5
10
5
10
6
9
6
9
7
8
7
8
Switch #1
1
14
Switch #2
2
13
3
4
GND
7400
+5V
LED
GND
7404
+5V
11
Figure 3. Connecting the 7404 to the 7400.
6. Go through all four possible switch combinations and record the status of the output LED in
the table on question 3 of your solution sheet. Based on those answers, determine the logic
function implemented by the series combination of a 7400 and 7404 chip (question 4) as well as
the logic function of the 7404 (question 5).
EC312 – SX-02 –Logic Gates and Transistors
7. Remove the 7400 and 7404 chips and wire a 7432 as shown in Figure 4.
Switch #1
1
14
Switch #2
2
13
LED
3
12
4
GND
7432
+5V
11
5
10
6
9
7
8
Figure 4. Wiring diagram for the 7432.
8. Go through all four possible switch combinations and record the status of the output LED in
the table on question 6 of your solution sheet. Based on those answers, determine the logic
function implemented by the 7432 (question 7).
Transistor Circuits
9. TURN OFF POWER TO YOUR DIGI DESIGNER BOARD. In this section we’ll build a
logic gate from a transistor circuit, as shown in Figure 5. The input to the circuit will come from
one of the logic switches, which is either 0V (off) or 5V (on). Before we build the circuit, let’s
do some circuit analysis to determine what we expect to happen.
Figure 5. Transistor Circuit Schematic.
Based on your knowledge of transistors, what do you expect to be the state (On/Off) of the
transistor and of each LED when the logic switch (i.e. the input) is set to 0V? What about when
the logic switch is set to 5V? [These are question 8 and question 9 on your answer sheet.]
EC312 – SX-02 –Logic Gates and Transistors
10. To build the circuit from Figure 5, you’ll use a 2N3904 Transistor, three 1kΩ resistors, and
the green and red LED’s with two wires (i.e. not the Digi Designer logic lamps). You must be
careful how you orient the transistor and LED’s in the circuit, so that you do not damage
them. Figure 6 shows which pins on the transistor correspond to the Base, Collector, and
Emitter. Figure 7 shows which side of the LED is the cathode (i.e. the side that should be
towards the lower voltage, which is ground in this case).
2N3904
Figure 6. Transistor pin identification
Figure 7. LED (cathode is on the flat side)
11. After you’ve built your circuit, have your instructor or lab tech check your circuit wiring as
well as your answers to questions 8 and 9.
Instructor/Lab Tech Initials: ______________
Once your circuit has been checked, turn on the power to the Digi Designer board. Go through
the two possible “switch” combinations (i.e. logic switch power on and off) and fill out the table
on question 10 of your solution sheet. Based on your results, determine which logic function is
implemented by this circuit (question 11).
IV. Critical Thinking questions (answer on solution sheet)
12. If the 7432 chip was connected to a 7404 like the 7400 was connected to the 7404, what
would be the logic function produced by the 7432/7404 combination?
13. If we inverted the inputs and outputs of the 7432 chip using NOT gates, what logic function
would result? (Hint: determine the truth table for this circuit, and then compare to other known
truth tables.)
EC312 – SX-02 –Logic Gates and Transistors
Name: _______________________________
Section: __________________
Question 1: Fill in your results from part 4 (i.e. the circuit in Fig.2) in the logic table below:
Switch One
Switch Two
LED Output
OFF
OFF
OFF
ON
ON
OFF
ON
ON
Question 2: Based on your answers to question 1, which logic function is implemented by the 7400 chip?
Question 3: Fill in your results from part 6 (i.e. the circuit in Fig.3) in the logic table below:
Switch One
Switch Two
LED Output
OFF
OFF
OFF
ON
ON
OFF
ON
ON
Question 4: Based on your answers to question 3, which logic function is implemented by connecting a
7400 chip in series with a 7404 chip (i.e. circuit in Fig. 3)?
Question 5: Based on your answers to questions 2 and 4, which logic function is implemented by a 7404
chip by itself?
Question 6: Fill in your results from part 8 (i.e. the circuit in Fig.4) in the logic table below:
Switch One
Switch Two
LED Output
OFF
OFF
OFF
ON
ON
OFF
ON
ON
Question 7: Based on your answers to question 6, which logic function is implemented by the 7432 chip?
EC312 – SX-02 –Logic Gates and Transistors
Question 8: When the logic switch (i.e. the input) is set to 0V, what do you expect to be the state (On/Off) of
the transistor and of each LED?
Question 9: When the logic switch (i.e. the input) is set to 5V, what do you expect to be the state (On/Off) of
the transistor and of each LED?
Question 10: Fill in your results from part 11 (i.e. the transistor circuit in Fig.5) in the table below:
Logic Switch
OFF (GND)
LED1
LED2
ON (+5V)
Question 11: Based on your answers to question 10, does the transistor circuit in Figure 5 correspond to any
fundamental logic elements? If so, which one(s)?
Question 12: If the 7432 chip was connected to a 7404 in the same manner that the 7400 was connected to
the 7404, what would be the logic function produced by the 7432/7404 series combination?
Question 13: If we inverted both the inputs and the outputs of the 7432 chip using NOT gates, what logic
function would result? (Hint: determine the truth table for this circuit, and then compare to other known
truth tables.)
Download