Difference between revisions of "CSC270 Lab 2 2016"

From dftwiki3
Jump to: navigation, search
(Experiment #2: Challenge of the day)
(Experiment #3)
Line 101: Line 101:
 
<br />
 
<br />
 
<br />
 
<br />
[[Category:CSC270]][[Category:Labs]]
 
 
==Challenge of the Day, #1==
 
 
Use a 74LS42 to implement a 3-to-8 decoder with enable and active-low outputs.
 
 
==Challenge of the Day, #2 ==
 
 
Use a 74LS42 to implement a majority voter of 3 input signals.  You can only use one extra chip, in addition to the 74LS42!
 

Revision as of 20:21, 3 February 2016

--D. Thiebaut (talk) 20:15, 3 February 2016 (EST)




LAB #2

Decoder Circuit: the Do-It-Yourself version

Part 1

Complete the circuit shown in Figure 1 by adding the part numbers of the circuits. Add this number inside the logic symbol, and also add 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.
  • Also, make sure that you connect the outputs of the inverters to the four logic indicators (LEDs). 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.


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


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 "intuitive" behavior.

The 74LS42 Datasheet

74ls42a.png
74ls42b.png
74ls42c.png


Experiment #1

Study the 74LS42 data-sheet. Observe it carefully and figure out what kind of decoder it is:

Question 1
Is it a 3-to-8 decoder? A 4-to-16 decoder? If not, then what?
Question 2
Does it have an enable input signal?
Question 3
Are the outputs active high or active low?

Using the schematics as your guide, design a 3-to-8 decoder with enable and active-low outputs using the 74LS42 as your main circuit. The challenge here is that you only have 4 LEDs to show outputs. You cannot use one LED connected to two different outputs, or one of the outputs will get damaged in the process. You'll have to switch back and forth between LEDs and signals to show one set of outputs, for example the lower 4 output bits, and the other set of outputs, i.e. the upper 4 output bits.

Experiment #3

We should have seen in class the basic concept of a multiplexer. (Wikipedia has a nice description of a multiplexer.)

Pick a simple design for a multiplexer, implement it (use Karnaugh maps!), and demonstrate that it works.