Project Overview
The purpose of this project is to get even more practice with building circuits both on MultiSim and hands-on, as well as with K-mapping. The seven-segment display must be a common cathode, and limiting resistors will be used, however, the Digital Logic Board (DLB) has the resistors built into it already. We will be wiring a seven-segment display to present our birthday when different series of XYZ inputs are entered.
Truth Table
The Truth Table is used to derive the logic expressions that will then be simplified through the use of K-mapping or Boolean algebra in order to build a circuit that works in a specific way.
For this Truth Table, X Y and Z are the inputs and the letters "a" through "g" are each their own outputs. There are seven segments that we will be dealing with (a-g), so each individual column will be looked at as its own function where each column acts as the outputs while sharing the same inputs. The ''X" stands for "don't care" conditions, which means that it does not matter if this is a "1" or a "0" because we only need to display 6 numbers. This makes K-mapping a lot easier and makes our circuits simpler.
K-Maps and Logic Expressions
K-mapping is one way to go from a truth table to logic expressions. The number of boxes used is determined by the amount of rows in the truth table. The boxes are filled in starting at the top from left to right using the "1"s and "0"s found by going down the output column of the truth table. The bottom two rows of the K-map switch places with each other due to the way that the K-map will be labeled. The table is then labeled so that each box will have a different combination of the three variables. The first column is labeled with a NOT version of the third variable, and the second column is labeled with the third variable. Down the rows, the first two variables are used. In the first row, both are NOTs, in the second, the first is NOT and the other is normal. In the third row, both are normal, and finally, in the last row, the second variable is NOT and the first is normal. Grouping can be done in many ways, but a general rule is to make the smallest number of groups, or therefore, look for big groups that can be made to encompass as many "1"s as possible. When grouping, all "1"s must be grouped with either other "1"s or "X"s, but not all "X"s need to be grouped. Groups of 2, 4, and 8 can be made with this size table, between adjacent "1"s or "pac-man" style on opposite sides of the chart. Expressions are in Sum of Products form. Each minterm was found from the groups created by K-mapping; each group that is circled is reduced and written in a minterm by the variables that every box shares. K-mapping is used instead of Boolean algebra because it is faster (once you are able to do it correctly and quickly) and is more likely to provide the most simplified expressions. There are a total of 7 expressions because there are 7 segments, and each segment will need a circuit in order to decide whether that segment is on or off at certain points.
MultiSim Implementation
The following image is a screenshot of the circuit built with Circuit Design Software. Using CDS to design a circuit before physically building it allows you to test and troubleshoot the circuit beforehand.
This circuit is in bus form, making it easier to trace. A total of 23 gates are used for the circuit, 2 of which are OR gates, 8 are NANDs and 13 are NORs. This means that to build the circuit with 2-input only gates, one 74LS32 chip will be needed, 2 74LS00 chips will be needed, and 4 74LS02 chips will be needed. This is because each chip contains 4 gates, so the number of chips needed is equal to the next largest integer of x / 4.
The use of NAND or NOR gates can reduce the amount of gates required to build a circuit, and they can also eliminate the need for different kinds of chips, because you can build a whole circuit with one kind of gate. In almost every instance that I modified my AOI implementation to NAND/NOR, it contained more gates, but fewer chips. There were a few times when both used the same amount of chips, and one time when AOI implementation made the most sense. For the most part though, at least one of the NAND/NOR implementations needed one less chip than the AOI implementation. This is important because this allows the circuit to use less materials and; therefore, cost less (more efficient).
Each of the segments in a seven-segment display is powered/grounded individually. The common cathode has all of its segments already grounded, so they just need to each be connected to power, or voltage, to turn on. The common anode, on the other hand, has segments that are connected to voltage, so they need to be grounded to light up. We are using the common cathode because our circuits are designed to work with outputs of "1", or with voltage, meaning that the segments should turn on with a "1". The resistors limit the current to dim the light of the segments and are commonly 220 ohms.
Bill of Materials
The Bill of Materials gives an accurate estimate of the materials and amount of those materials that will be used to completely build the circuit.
Bread-boarding
This shows the board with all of the IC's that will be needed (this took me a while because the chips kept popping out).
|
In this picture I've wired every chip to power and ground, and I've set up the columns for the X Y and Z inputs.
|
This is the final product, a total of 5 different circuits plus one that is directly connected to power, because it's always on. Each circuit is color coded and some of the extra wires are used to extend the space available for the X Y and Z variables.
|
My second breadboarding experience was very good, I finished with a whole day left. My biggest problem with the circuit was getting the chips to stay in the board. It took me a while to bend the pins in the right way in order to get the chips to stay in, and they still ended up popping out. That is partly why they're placed in the way that they are on the board because some locations seemed to be more forgiving than others. I took my time with building this circuit because it was a whole lot of wires and I was so afraid of messing up and then having to trace the whole thing (although I checked each segment individually). I made sure to keep referencing the diagram of the inside of the chips, because I know that the layout of the NOR chip is the opposite of all of the others, and I sure had a lot of NOR chips. I feel like I better understand how to set up a circuit; powering and grounding all chips, etc. I also learned that color-coding is a very good practice because the circuit looks neater and is easier to trace, although it takes a while to cut and trim your own custom wires, which I had to do a lot of.
Conclusion
From this project I learned how NAND and NOR gates and chips work and how they can be more efficient than AOI implementations in real-world applications. If I could do this differently, I would make it more efficient and use circuits with combinations of NAND and NOR for some of the segments, this would require less chips. If I could get down to one less NOR gate then I would only need 3 NOR chips. It seems a little clunky when we have to flip the switches for each number... why can't we just press a button and have it display each number and go on to the next after a few seconds?
Extra Credit Attempt
I started by drawing each circuit with AOI implementation, and then redrawing each circuit with NAND-only and NOR-only. Then I compared the amount of gates needed for each of the 3 circuits and circled the one that needed the least amount for each segment. At the bottom, I totaled the gates and then ICs to get 7 total ICs (the totals for NAND and NOR should be switched because I ended up changing the circuit for the c segment).