ECE2020_Lab1_Spring24

docx

School

Georgia Institute Of Technology *

*We aren’t endorsed by this school

Course

2020

Subject

Electrical Engineering

Date

Apr 3, 2024

Type

docx

Pages

13

Uploaded by PrivateBoulderQuail31

Report
GEORGIA INSTITUTE OF TECHNOLOGY School of Electrical and Computer Engineering ECE 2020-B Spring 2024 Lab #1: Digital Logic Module GOAL To introduce the physical implementation of design logic circuits including the use of logic gates, Boolean algebra, mixed logic, integrated circuits, and breadboards. CONTENTS Pre-lab Procedure Page 1 Lab Procedures Page 2 Check-offs Page 4 Appendix A: Background Information Page 5 Appendix B: Select Datasheet Information Page 7 Appendix C: Prelab Design Problems Page 8 EQUIPMENT NEEDED NAND gate (74xx00) NOR gate (74xx02) NOT gate (74xx04) Jumper wires Breadboard NI myDAQ and associated PC software Check-offs Design 1 built and tested: TA or Instructor Initials ________________ Design 2 built and tested: TA or Instructor Initials ________________
2 PRE-LAB PROCEDURE (done before coming to class on lab day) 1) Download the NI ELVISmx software and install it on your laptop. Make sure that the NI ELVIS “Instrument Launcher” software runs. This process takes an hour or two , so do it well before coming to class. The software can be found on the National Instruments website at: http://www.ni.com/en-us/support/downloads/drivers/download.ni-elvismx.html You do not need labView. For students using a Mac, You should find a partner with a Windows computer, or you can use a computer in Klaus 1446 (but that will limit the amount that you can benefit from the in-class session). 2) Make a plan to have a myDAQ for the in-class day (likely borrowing one from the library). 3) Read the background information in Appendix A of this document. 4) View the breadboard and myDAQ introduction videos at: https://www.youtube.com/watch?v=psrfAgDvYfs https://www.youtube.com/watch?v=kd0RHtmtCoQ 5) Complete the prelab design steps in Appendix C of this document. 6) Simulate your designs as described in Appendix D of this document. Once complete, you should have two circuits designed, simulated, and ready to prototype in class.
3 LAB PROCEDURE – Done in class on lab day 1. myDAQ Setup a. Connect the myDAQ to your USB port. b. Start the NI ELVIS Instrument Launcher software. Click on the DigIn and DigOut icons to open the Digital Reader and Digital Writer. The panels will look like those in Figure 1 below. The digital IO lines can be configured as read lines (outputs from your circuit to be read by the myDAQ) or write lines (outputs from the myDAQ to your circuit). Select lines 0-3 as write lines and lines 4-7 as read lines. Figure 1. Digital Writer (left) and Digital Reader (right). c. The Digital Writer panel image shows that Lines 0 and 1 are set to “high”. This is a logical value of “1”, implemented in this system as +5 V. Lines 2 and 3 are set to “low”, which is a logical “0”, implemented here as 0 V. You can toggle the input values between 0 and 1 by clicking on the switches. Click on the “Run” button when starting your measurements and the “Stop” button when you are done using the myDAQ. Not working? Try this: If the available software screens do not give the icons for the digital writer or reader, then you may have started NI LabVIEW instead of NI Elvis Instrument Launcher. Terminate that program and try again. Make sure you plug the myDAQ into the computer USB port before starting the software, and wait for Windows to complete any driver installation. If you started the software first, terminate the program and try to run it again with the hardware already connected. 2. Connecting and testing a NOT Gate
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
4 This part of the experiment may be done with a partner. a. Insert a NOT gate IC into your protoboard such that the chip straddles the center gap, as shown in the introductory videos from the prelab. The pins are easily bent , so ensure that they are aligned with the breadboard holes before pushing the chip in. b. Refer to the chip’s data sheet or the excerpts in Appendix B as needed. Connect the digital ground from the myDAQ to pin 7 on the chip, and the +5V supply voltage to pin 14. c. There are six NOT gates in the chip with inputs labeled 1A, 2A, …,6A and corresponding outputs labeled 1Y, 2Y,…,6Y. Connect a digital output on your myDAQ (DIO 0, 1, 2, or 3, if you followed the instructions in step 1) to a NOT gate input. Then connect the corresponding NOT gate output to a digital input on your myDAQ (DIO 4-7). d. Use the myDAQ software to confirm correct operation of the NOT gate: toggle the input to make sure that a 0 input yields a 1 output and vice versa. Chips not working or not working as expected? Troubleshooting: Check the orientation of the chip by looking for the notch or dimple at one end of the chip, and confirm that you have used the correct pins by referring to the datasheet. Your chip might have circular markings on each end from the manufacturing process, so ensure that you are using the actual pin 1 indicator. Confirm that the configuration of the digital input and output lines in the software matches how you are physically using those pin on the myDAQ, and that the myDAQ software instruments are in “run” mode. Use a digital input on the myDAQ to measure the power to the chip and the ground to the chip, confirming that they indicate logic 1 and logic 0. Check for loose wires into the protoboard or out of the myDAQ, and confirm that the wires are correctly inserted into the myDAQ’s terminal block. Use the screw driver to refasten loose wires in the myDAQ terminal. 3. Connecting and testing a NOR Gate This part of the experiment may be done with a partner. Ensure that both of you get experience plugging in and wiring chips and using the software. a. Insert the NOR gate IC into your protoboard. b. Review the datasheet information as needed. Connect the ground from the myDAQ to pin 7 and +5V to pin 14. c. There are four NOR gates labeled 1-4, each having inputs A and B and output Y. Connect digital I/O lines from the myDAQ to the inputs and output of a NOR gate, ensuring that you use appropriate connections. d. Verify the NOR gate functionality by testing all four combinations of the inputs and confirming that the device implements the truth table for a NOR gate. 4. Building Design 1
5 The building part of this step should be done individually. You may share a myDAQ with someone if that is more convenient. a. Build the first circuit that you designed in the prelab. Ensure that each chip is connected to power and ground. b. Test your circuit by confirming the output behavior based on all combinations of the inputs. c. Show your working circuit to a TA or instructor and have them check off below. 5. Building Design 2 The building part of this step should be done individually. You may share a myDAQ with someone if that is more convenient. a. Build the second circuit that you designed in the prelab. Ensure that each chip is connected to power and ground. b. Test your circuit by confirming the output behavior based on all combinations of the inputs. c. Show your working circuit to a TA or instructor and have them check off below.
6 A PPENDIX A: B ACKGROUND I NFORMATION Breadboard: Breadboards (also known as protoboards) make many connections under the board in order to reduce the number of wires that you have to connect. Typically, groups of 5 holes are connected. The side rails are lines of groups of 5 that are all connected. See Figure 1 below. Figure 1. Breadboard Layout Integrated Circuit (IC): An integrated circuit (sometimes called a chip) can have many gates on it. For example, the MC74HC08AN chip has 4 AND gates wired as shown in Figure 2 below. It has 14 pins coming out the sides, including a ground (GND) and a supply voltage (V cc ). The plastic package has a notch, dot, or dimple at one end to determine the orientation: pin 1 is the first pin counter-clockwise from the mark. Figure 2. MC74HC08AN Pin Layout Pin Diagram: A pin diagram helps to wire the circuit. A pin diagram is a gate schematic with appropriate pin numbers, corresponding to the physical chips, next to gate inputs and outputs on a gate schematic. See Figure 3 below for an example of a pin diagram.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
7 Figure 3. An example pin diagram. This is interpreted as wiring the ‘A’ input signal to pin 2 of the NOR gate IC (which is the input of a NOR gate), PIN 1 of the NOR gate IC (which is the output of a NOR gate) to PIN 1 of the NOT gate IC (which is the input of an inverter), etc. National Instruments myDAQ: Data Acquisition (DAQ) hardware is used to measure physical signals and convert them into a form that can be viewed and stored digitally. The National Instruments myDAQ has both analog and digital inputs and outputs. The digital input/output (DIO) lines are labeled 0-7 in the side view of the myDAQ. Also shown below in Figure 4 are the digital ground (DGND) and the supply voltage, 5V. The myDAQ comes with several software instrument panels that run on a PC, including a digital reader and digital writer, which let you see and set the logical state of the DIO pins. Figure 4. National Instruments myDAQ
8 A PPENDIX B: S ELECT D ATASHEET I NFORMATION NAND Gate IC (74HC00) or (74LS00): NOR Gate IC (74HC02) or (74LS02): NOT Gate IC (74HC04) or (74LS04):
9 A PPENDIX C: P RELAB D ESIGN P ROBLEMS Design 1: A manager wants you to design a logic circuit to automatically lock a door based on the time and whether or not the receptionists are present. Specifically: The circuit will have three inputs: o Input A is active when it is after hours. o Input B is active when receptionist Barbara is seated. o Input C is active when receptionist Chuck is seated. The circuit should produce output D, which locks the door when active. o If it is after hours, the door should be locked. o If neither receptionist is seated, the door should be locked. Write a Boolean expression for D in terms of A, B, and C. Draw a mixed-logic schematic for D, and change it to an implementation using only NORs and inverters. You should end up with two 2-input NOR gates and one inverter. If you don’t, go back and check your logic, or try to simplify your expression.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
10 Design 2: A customer has installed sensors on several things on her porch: Sensor ‘F’ is active when there is food in the bird feeder. Sensor ‘B’ is active when a bird is present on the bird feeder. Sensor ‘P’ is active when the potted plant’s soil is dry. You have been asked to create some logic to notify the customer that something needs attention. You will produce signal ‘N’ based on the following: Notify the customer when the bird feeder is empty and a bird is present. Notify the customer when the plant needs watering. Write a Boolean expression for N in terms of F, B, and P. Draw a mixed-logic schematic for N, and change it to an implementation using only NANDs and inverters. You should end up with two 2-input NAND gates (one drawn as a BOR) and two inverters. Circuit Annotation: Annotate your schematics above with pin numbers on the inputs and outputs of all gates corresponding to physical chips. For example, if you need to invert a signal, you could put that signal into pin 3 of a 74’04 chip, and the inverted signal would then be available from pin 4 of that chip to use elsewhere in your circuit. Refer to the chip datasheets, or the excerpts provided in Appendix B.
11 A PPENDIX D: T HE CIRCUIT SIMULATOR You will use an online circuit simulator that is able to simulate logic gates. You can find the simulator here: http://lushprojects.com/circuitjs/circuitjs.html Simulator Interface In the top-right of the simulator, you can run/stop and reset the simulator. This will usually not be needed, but the simulator will pause itself if something in the circuit goes wrong, and may need to be restarted. The “simulation speed” and “current speed” are related to analog circuits. Since you will be building digital circuits, these controls will not be needed. At the top are various menus, similar to most programs. The basic circuit shown above can be loaded by selecting Circuits > Combinational logic > Exclusive OR. At the bottom of the window is an “oscilloscope” view, which will not be needed for the circuits you create, so ignore it. You can use the scroll wheel to zoom in and out.
12 Existing components (wires, gates, inputs, outputs) can be moved or resized by using the default selection tool. In particular, wires can be moved by dragging them from the middle, or their endpoints can be moved by dragging the ends of the wire. Note that wires in this simulator only connect at their endpoints . If you need something like a T junction, you need to connect three separate wires to the junction. Simulator Controls Some keyboard shortcuts will be useful when creating circuits: Press escape on the keyboard to leave any drawing mode (for example, if you are in wire-drawing mode, press escape to leave it) Press ‘w’ to begin drawing a wire. You can then click and drag in the design area to create a wire. Wires display as green when driven logic high and grey when either not driven or driven logic low. Press ‘i’ to create a logic input. You can then click and drag to create an input that you can later toggle high and low (which it displays as H and L). Press ‘o’ to create a logic output, which will let you easily monitor the state of a particular signal. Keyboard shortcuts for logic gates are listed in the Draw > Logic gates menu, if you want to use them (or you can just select them from that menu). Testing Your Designs Opening the simulator Open the simulator linked at the beginning of this section. As described in that section, open the XOR demo circuit. Click on the inputs to toggle their state, and confirm that the logic does in fact implement XOR logic. Simulating Design 1 Delete everything in the circuit area. (you can click and drag to box-select everything, or press ctrl-A to select everything, then press delete to delete it) Build the circuit implementing design 1 from the prelab. Include three logic inputs and one logic output. If your design has a bubbled AND gate, draw it as a NOR in the simulator, since the simulator does not have BAND gates. Remember that you can use the scroll wheel to zoom in and out. Test your circuit by toggling the inputs high and low and confirming that the output produces the required logic. If anything is wrong, re-work your expression or circuit designs. Once you have confirmed correct operation, 1. Take a screenshot of your circuit and save it somewhere where you can retrieve it later. 2. Save your design by going to File > Export as link , then saving the link (e.g. by pasting it into a text editor and saving it).
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
13 Simulating Design 2 Repeat the process to build design 2 from the prelab (starting by deleting the existing circuit). If your design includes any BOR gates, draw them as NANDs in the simulator since the simulator does not support BOR symbols. Remember: the purpose of simulation is to increase confidence in your design so that you don’t waste time prototyping a fundamentally flawed circuit. It is in your best interest to confirm that your logic and your gate schematic are correct. Once you have confirmed correct operation, 1. Take a screenshot of the circuit and save it for later. 2. Save your design as a link in the same way as before.