CSC270 Lab 2 2012

From dftwiki3
Revision as of 14:59, 7 February 2012 by Thiebaut (talk | contribs) (Created page with "--~~~~ ---- __TOC__ <br /> <br /> <bluebox>This lab deals with AND, OR, and NOT gates, as well as NAND-gate circuits. There is a little bit of programming with Python as well....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

--D. Thiebaut 14:59, 7 February 2012 (EST)





This lab deals with AND, OR, and NOT gates, as well as NAND-gate circuits. There is a little bit of programming with Python as well. Your report is due next week.



LAB #2

The Transisor

The transistor is a three-pole semiconductor. The poles are polarized and have well defined functions. They are called the collector, the base, and the emitter.

The transistor you will be using today is the 2N5772, and the manufacturer (fortunately) marked the poles on the package (E, B, and C).

Implement the circuit shown below. Connect the input of the circuit to a switch, and its output to an Indicator. Observe how the output changes as a function of the input. Generate a truth table for this circuit. What logic function does it implement?


TransitorCircuit.png


Resistor Color Chart



ResistorColorChartInteractive.png


Experiment #3: 2-bit adder

  • Implement the 2-bit adder with NAND gates and/or NOR gates.
  • Demonstrate that your circuit works!

Experiment #3: 3-bit adder

  • Implement a 3-bit adder with only NAND and/or NOR gates.



CS270Nand.png
      74LS00 NAND

          

CS270Nor.png
       74LS02 NOR


Note that the NOR circuit does not have the same pinout as the NAND circuit!!!



Decoder Circuit: the Do-It-Yourself version

Part 1

Complete the circuit shown in Figure 1 by adding the name of the circuit inside the logic symbol, and by adding the pin numbers on the inputs and outputs of the gates. Also, do not forget that each circuit requires power and ground.

CSC270 Decoder1.gif
Figure 1. Decoder implemented with Inverters and NANDs.

When you are done, implement the circuit on the breadboard section of your kit. Make sure you have turned off the power before you start wiring. Make sure also that you connect the outputs of the inverters to the four logic indicators. Verify your connections before you turn the power back on. Activate the two inputs and record the outputs in a truth table which you'll include in your report.

Because the inactive outputs are all set to zero, and the active one is set to 1, we refer to this type of circuit as a circuit with "active high" outputs.

Part 2

Now connect L1, L2, L3 and L4 to the input of the inverters rather than their output, and record the variation of L4, L3, L2 and L1 as a function of SW2 and SW1.

SW1 	SW2 	L4 	L3 	L2 	L1
0 	0 	  	  	  	 
0 	1 	  	  	  	 
1 	0 	  	  	  	 
1 	1 	  	  	  	 

You now have the opposite behavior, where the inactive outputs are all 1 except for one that is set to 0. We refer to this type of circuit as a circuit with active-low outputs.

Most decoders work as the last circuit you just tested, rather than the one you first experimented with, although the first circuit had a more "logical" behavior.

The 74LS42 Decoder

CSC270 7442.gif
Figure 2: The 7442, as wired on the HeathKit digital trainer.

Block 6 on the circuit board attached to your kit contains a circuit centered on a 7442 (or 74LS42). The logic diagram of the circuit is shown in Figure 2. It has four inputs connected to the test points labeled TP602, TP603, TP604, and TP605. Connect these test points to the data switches. You may want to add a "post-it" note above the data switches to indicate which inputs of the 74LS42 (A, B, C or D) you are activating with the switches. The ten outputs of the 7442 are connected to 10 LEDs, labeled L604 to L613.

To apply power to the 7442, close DIP-switches 7 and 8 in Block 6 (closing a switch means bringing it in the position where the little knob is aligned with the number "1" painted on the switch). (Note: A Dip switch is a "Dual In Line" switch, that is a series of miniature switches that have the same footprint as a regular integrated circuit.)

Turn the Kit power back ON. Activate the data switches and record the variation of the output LEDs in a table


D C B A L13 L12 L11 L10 L9 L8 L7 L6 L5 L4