Comments 0

Document transcript

ASSIGNMENT2:IntroductiontoDCCircuitsandDigitalLogicFor each section of the assignment, the work that you are supposed to turn in isindicated in italicsatthe end of each problem or sub-problem. This result may be a drawing/schematic, a writtenanswer, or an equation, or a combination of all three. I prefer that schematics are drawn neatly byhand (this is foryour benefit—it’s quicker than using a draw program on a computer). Please turn inhard copy.2-1:BasicPrototypingandthe74HC00QuadNANDGate.In this exercise, you will learn basic prototyping skills using your UML305DEV board and thesolderless breadboard.The figure below illustrates a section of the solderless breadboard:+ red– blue+ red– blueEach group of holes that is connected (in the drawing) with a thin line is connected electrically on theboard. Thus, there are two sets of horizontal “busses,” along the top and bottom, and verticalgroups of five holes. The horizontal busses are used for power and ground distribution, and thevertical holes are used to install and connect parts.The busses are printed in red and blue, and labeled + and –. Start off by connecting power andground from the UML305DEV board to one of your proto boards. Get a length of red wire, stripabout 1/3 of an inch of insulation from both ends. Then run one end into one of the four +5vsockets on the UML305DEV board. Connect the other end to one of the red bus strips. Get asecond red wire, and connect from one red bus to the other red bus.Using a black wire, also connect ground from the UML305DEV board to one of the blue busstrips. Get a second black wire, and connect from the blue bus to the other blue bus.91.305Assignment2http://www.cs.uml.edu/~fredm/courses/91.305/files/assignment2.pdf

page1Your set up should now look like:+ red– blue+ red– blueredredblackblackNow you’re ready to install a chip and wire it up. Get the 74HC00 quad NAND gate chip, andplug it into the breadboard, straddling the vertical banks of pins. Arrange the chip so that the notchis to the left, putting pin 1 in the lower left corner:+ red– blue+ red– blueredredblackblack)74HC00Now, connect power and ground to the chip by running wires to from the chip to the powerbusses. Pin 14 is the power pin; use a red wire to connect it to the red power bus. Pin 7 is theground pin; use a black wire to connect it to the blue ground bus:91.305Assignment2http://www.cs.uml.edu/~fredm/courses/91.305/files/assignment2.pdf

page2+ red– blue+ red– blueredredblackblack)74HC00redblackNow, let’s connect to an actual gate from the chip. Looking at the data sheet, one can see that thegates are connected as illustrated:We’ll connect the #1 gate. The inputs A1 and B1 are at pins 1 and 2, and the output Y1 is at pin3. Using white wires, connect the inputs to pushbuttons SW1 and SW2, and the output to LED1.The circuit should now look like:+ red– blue+ red– blueredredblackblack)74HC00redblackAt this point, turn on the UML305DEV board. Make sure the red power LED next to the powerswitch is on.The pushbuttons generate logic low (0v) signals when they are not pressed. So, the input to theNAND gate is 0 0, and its output should be logic high (5v). Thus, LED1 should now be lit.91.305Assignment2http://www.cs.uml.edu/~fredm/courses/91.305/files/assignment2.pdf

page3Test the NAND function: when both inputs are true (buttons pressed), the output goes low (LEDoff).To turn in: nothing to turn in.2-2:NANDasInverter.Design a circuit that allows the NAND gate to be used as an inverter. The circuit should have oneinput and one output. Use SW4 as the input and LED2 as the output. Use a different gate on theNAND package than the one you wired in Exercise 1. Build and test the design.To turn in: Draw a schematic of your resulting circuit, including the pushbutton switch, output LED,and power/ground connections.2-3:Transistor/LampCircuit.CMOS outputs can source between 5 and 20 mA of current. The small lamp in your kit requiresabout 50 mA of current to light. Therefore, CMOS outputs can not properly drive the lamp.The NPN transistor in your kit is an ideal device to use to provide drive current for the lamp.The schematic below shows how this works. The CMOS output is connected to the base of thetransistor (B) through a 10k resistor. When the CMOS output is high, a small current flowsbetween the base and the emitter (E). This small current causes a large current to flow through thecollector (C) - emitter (E) junction, turning on the lamp.

The diagram below shows how the three transistor signals are attached to the physical device(known as the TO-92 package).91.305Assignment2http://www.cs.uml.edu/~fredm/courses/91.305/files/assignment2.pdf

page4Using this information, wire your NAND gate to control the lamp.Before building,try wiring the lamp directly to the NAND output (from the output to ground). Doesit light up at all when the output is high?Draw a circuit diagram of the final configuration, including power and ground connections. When youhave the circuit work, answer: how much brighter does the lamp seem when running through thetransistor?2-4:Counters.With the assistance of the data sheet, hook up the 74HC393 dual 4-bit binary counter. Use apushbutton to generate the clock input; when it’s working, you should see it increment one countper button press.Draw a circuit diagram of the chip and how you have attached it so that it will count.Does it count on the rising edge or falling edge of the clock signal?Using the chips in your kit, design a circuit that will generate a carry from the first counter stage to actas the clock input of the second, creating a full 8-bit counter. Do the counters increment on the risingedge or the falling edge of the clock signal? Make sure to think this through, so that the secondcounter increments on the same edge as the first.Draw a circuit diagram of your 8-bit counter.Typically, counters are built with chains of flip-flops. Using your 74HC73 dual JK flip-flop chip,build a two-bit counter.Draw a circuit diagram of your 2-bit counter.91.305Assignment2http://www.cs.uml.edu/~fredm/courses/91.305/files/assignment2.pdf

page52-5:MysteryChips.Synopsis.Youaregiventwochipsfromthe74HCxxxseries.Withoutdestroyingthemintheprocess,identifitythem.Process.Themethodismoreimportantthantheresult.Inotherwords,youmustdocumentyourthoughtprocess and experimental method—the way that you go about finding the solutions. You must turn in a detaileddescriptionofthestepsyoutakewitheachchipthatledyoutoyourconclusion.Aboutonefullpageofsingle-spaced,printedoutputisexpected(perchip).Just turning in the answer, e.g., “The 14-pin chip is the 74HC00” is not acceptable. (Note: this isn’t the correctanswer, so you’ve just had one possibility eliminated.)Method.Itisimportanttoavoidburningoutthechipduringtesting.Thismeansyoumustnotwirechipoutputstopower or ground. So you must first determine which pins are input and which are output.First of all, make sure you wire the chip to power and ground properly. Holding the chip like this:❩powerground.The+5vpowerpinisontheupperleft,andthegroundpinisonthelowerright.Todetermineifagivenpinisaninputpin,wirethepinto+5vusinga1kresistor.Then,measurethesignalatthe pin using your logic probe. If it’s an input, it should be high. Now, connect the pin to ground with the resistor.Measureitagain.Ifit’snowlow,thenitisaninput.Ifthepineverdisagreeswiththevalueyou’reassertingwiththeresistor,thenitisanoutput.Go around all of the pins and determine which are input and which are output. Once you know a pin is an input,youmaywireithighorlowwithawire(theresistorisn’tneeded).Butbesuretonotwireoutputsto+5orgroundwithawire!

Iftheoutputistryingtogenerateasignalothertheoneyou’vewired,thechipwillgethotand may burn up.Connect the outputs to your LED indicators. Now vary the inputs, and figure out what the chip is doing. You maywant so systematically record all possible inputs and what outputs are generated, or explore and try to figure it outdifferently.Hints.Thetwochips(one14-pin,one16-pin)arebothmembersofthe74HCxxor74HCxxxseries.Botharepure combinational logic—outputs are directly a function of inputs, with no internal state (no flip-flops or latches).91.305Assignment2http://www.cs.uml.edu/~fredm/courses/91.305/files/assignment2.pdf