Introduction
We are learning many tools to help us analyze digital circuits. We are learning about boolean algebra, truth tables, logic equations, digital simulators, and building test circuits. The goal of this lab is to practice using many of these tools.
We will start with a given circuit. We are going to determine the logic equations, simulate the circuit to verify our equations, and then build it. This will give us the opportunity to practice our analysis skills and learn more about the tools we have available to help us.
We will be analyzing the circuit represented by Schematic 1. This circuit is a 2-input multiplexer. At a high level, the S input selects whether A or B shows up at Z. For purposes of this project we are going to analyze this circuit at a lower level and function on the logic equation and truth table.
Skills
- Organize and take engineering data in a manor that supports design and analysis.
- Create Logic Equations and Truth Table from a Digital Circuit
- Draw a digital circuit in a simulator
- Simulate a digital circuit
- Become familiar with using software to represent digital logic circuits
- Build and test a digital circuit
‼ Important
This is a practice project. You should take it seriously. Organize your data and notes as if you had to write a formal report on this project. You will have multi-week projects with lots of data to report on in the future. This is your chance to see what works for you and how to improve your organization and time management.
Tasks
Logic Equations and Truth Tables
The first task is to analyze Schematic 1 to determine the logic equation for Z. After writing your logic equation, create a truth table that represents this circuit. After creating your truth table create an electronic version of the truth table called: mux.txt. The file should look like Fig1_5.txt in Example Simulation Files (These files are linked in Moodle in the Textbook section). For mux.txt you will have inputs S, A, and B with an output Z. This file will be used to test your circuit in LogiSim-Evolution.
Analysis
- What questions do you have about writing the equation or the truth table?
Simulate your Circuit
‼ Important
DO NOT store your LogiSim files or other data on the desktop computers. The hard drives on these computers are reset on reboot. User data is removed at each reboot. You can store files temporarily. You should but them on a USB drive, cloud drive, or email them to yourself.
You should keep all the circuits and simulation files in their own directory. Organize and name by project.
- Draw Schematic 1 in LogiSim-Evolution (or simulator of your choice). Play with toggling the inputs from 1 to 0 and observe how the simulator functions. Make sure Z is the correct for the given input.
- Now test your circuit against the truth table you made, mux.txt. LogiSim-Evolution has the ability to test your circuit against every row of your truth table. When used properly this feature greatly simplifies testing.
- Goto Simulate → Test Vector…
- In the pop-up window select "Load Vector"
- Find your file mux.txt and load this file.
Select Run.
If your circuit is correct, you will see pass next to each row of the file. If any of the rows fail, they will be marked. This will tell you what input is causing the error.
- In LogiSim-Evolution goto Project → Analyze Circuit
- Click on the different tabs in the pop-up window.
- This is where you can do K-map analysis
- Look to see if the Expression matches what you wrote for the circuit, if they don’t match why not?
Analysis
- What questions do you have about the logic simulator?
- How do you know that what you simulated matches what you were given in Schematic 1
Build and Test
Build your working design using 74xx parts on your breadboard. When connecting your LEDs you will have to add a resistor in series. Schematic 2 shows a simple schematic of how to connect the LED and resistor to any digital logic pin. LEDs are directional elements, the anode (long wire) connects to the highest voltage while the cathode (short wire) connects to the lowest voltage. In this case connect the cathode to GND. The resistor is a bidirectional element, it doesn’t matter which way you put it in. The resistor should be 390Ω to limit the current.
We don’t have a way to quickly test our breadboard circuits. We must apply each possible input combination to the circuit and verify we get the correct output. Create a truth table of test data from the breadboard.
Circuit Build Tips
List of useful 74xx components we have in the lab (we have more than this so feel free to do some research):
- 00: 2-input Nand
- 02: 2-input NOR
- 04: Inverter
- 08: 2-input AND
- 32: 2-input OR
- 86: 2-input XOR
- We do not have XNOR or a 2-4 decoder.
- The red and blue bars on your breadboard should be wired up as power and gnd. This makes it easier to make the many power and gnd connections we need.
- To create the binary input, you will either need wires that you move or dip switches. They are called dip for dual inline plastic and are designed to fit on a standard breadboard. To create both logic levels the dip switches require pullup resistors. Schematic 3 shows the schematic of how to hook up a single dip switch so it provides a good input.
- The chips and dip switches are spaced to bridge the gap in the middle of the bread board. The leds require resistors in series to limit the current. Schematic 2 shows how to hook up the LED circuit.
- Schematic 4 is an example of how the switch is hooked up to an inverter. When the switch is closed a 0 is input to the inverter. The inverter outputs a 1. The high output turns the LED on. When the switch is open the inverter sees a 1 input and outputs a 0, turning off the LED. A logic 1 = VDD on the DMM and a logic 0 = 0V or GND on the DMM.
- Label wires on your 2nd schematic with breadboard row coordinates.
- On your schematic check off connections as you make them. This helps to keep track of what you still need to connect.
- Hand draw the LED circuit on a print schematic to help with the build
Analysis
- Is your built circuit correct?
- Does your truth table from your breadboard circuit match the truth table from simulation and the one you wrote by hand?
- How do you know?
- Does your truth table from your breadboard circuit match the truth table from simulation and the one you wrote by hand?
- What questions do you have about building circuits on a breadboard
Reflections
This project was designed to help you practice skills and ideas that we covered in chapter 3. You should also have a better understanding and ability to use some of the tools that help us analyze and design digital circuits.
This is a practice project. There is nothing to turn in. It is your chance to improve your skills before you are assessed. You don’t have to turn anything in but you should think about these questions.
- What was the hardest part of the project?
- What did you learn?
- What do you want more practice doing?
- How organized is your data. Could you write a report on this entire process if you had to?
- How would you improve your organization?