EE4522 - Lab 2A Ciarán O’ Mara - Student ID: 15154394 Lab purpose 1. Installation of circuit simulator Simetrix. 2. Download the user manual. 3. Schematic entry and transient simulation. Procedure 1. Download the Simetrix circuit simulator from their website. 2. Download the user manual from their website. 3. Follow the lab PDF to draw and configure the schematic. 4. Configure the simulator to transient and run the system. 5. Draw the truth table to ensure the schematic was correctly simulated. Analysis of Digital Circuit The digital circuit consist of 5 NAND gates. There are two square wave inputs x and y. Y has a frequency which is twice the frequency of X. In simple terms y reaches a digital HIGH twice within the 1second whereas x is only high once. There is an output F which is an accumulation of all 5 gates. In the sketch diagram below it is clear as to how the output is generated and confirms that it was correctly simulated. Fig 1. Schematic Diagram
30
Embed
Ciarán O’ Mara - Student ID: 15154394 · 1 Module: Digital Systems 1 EE4522 Lab: 3 Student name: Ciarán O’ Mara Student ID: 15154394 Lab Purpose Analyse, build and test a 3-
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
EE4522 - Lab 2A
Ciarán O’ Mara - Student ID: 15154394
Lab purpose
1. Installation of circuit simulator Simetrix.
2. Download the user manual.
3. Schematic entry and transient simulation.
Procedure
1. Download the Simetrix circuit simulator from their website.
2. Download the user manual from their website.
3. Follow the lab PDF to draw and configure the schematic.
4. Configure the simulator to transient and run the system.
5. Draw the truth table to ensure the schematic was correctly simulated.
Analysis of Digital Circuit
The digital circuit consist of 5 NAND gates.
There are two square wave inputs x and y.
Y has a frequency which is twice the frequency of X.
In simple terms y reaches a digital HIGH twice within the 1second whereas x is only
high once.
There is an output F which is an accumulation of all 5 gates.
In the sketch diagram below it is clear as to how the output is generated and
confirms that it was correctly simulated.
Fig 1. Schematic Diagram
The output, F is a combination of both the x and y signals.
The spike to a LOW @time 500ms is due to the fact that both input signals are
changing from HIGH to LOW and visa versa in that split second.
This causes the output to appear to spike to a LOW instantaneously.
Conclusion
The results of the simulation were as expected and confirmed with use of a truth table.
Creating the schematic and simulating the Digital Circuit was very straight forward and no
problems were met in the process.
Fig 2. Simulated Input & Output Signals
Fig 3. Truth Table & Simulation Table
Module: Digital Systems 1 EE4522
Lab: 2
Student name: Ciarán O’ Mara
Student ID: 15154394
Lab Purpose
Prototype digital circuit (XOR function using NAND)
Usage of prototyping facilities (HP-1 system)
Comparison of measurement results with simulation.
Lab Procedure
Get wires, capacitors and logic chips.
Study the circuit diagram and digital designer platform information before building the
circuit.
Ensure power is off and begin to build the circuit step by step.
Test circuit by flicking both switches to on and then both to off, no LED should light.
Then test one switch on and one switch off the LED should light.
If the circuit doesn’t work debug the circuit using the logic probe.
This is the circuit diagram drawn out. The truth table indicates the output in a digital sense. If only one
of the switches is switched to the on position a constant 5v is generated as a result of the gate
configuration at the 10th pin of the second UI
which is connected to an LED and then to
ground. This LED is like a digital signal, when
it’s on it signifies a 1 or %v and when it’s off
in indicates a 0 or 0V.
Inputs Output
X Y F
0 0 0
1 0 1
0 1 1
1 1 0
Fig. 1. Circuit Schematic Fig. 2. Truth Table
The output voltage is not exactly the 5V that is theoretically expected. This could be due to the fact
that the circuit poses a tiny resistance. Tiny voltage dividers could then reduce the output as a result.
However, a logic high exists inside a scale or a logic
level. This is where a range of voltages where a logic
HIGH exists. At the other end of the scale there’s a
range where a logic LOW exists. The undefined part
in the middle is where the signal is neither HIGH nor
LOW.
Therefore, the output HIGH signal in most cases just
has to be contained within the HIGH part of the logic
level. The readings taken in the lab are well inside the
logic HIGH and logic LOW parts of the logic scale.
The digital designer has three breadboards, LED indicators and switches. This makes it easy to build
and debug the circuit. 5 NAND gates are needed to build the circuit however each U1 chip contains
only 4 NAND gates, therefore two U1 chips are needed. The capacitors are used to generate a constant
smooth DC output.
F = 1 F = 0
4.98V 0.4mV
Component Quantity
U1 74HC00 X2
Capacitor X2
HP1 Digital Designer X1
Wire X23
Fig. 3. Example of a logic level
Fig. 4. HIGH & LOW voltage
outputs at F
Fig. 5. BOM (Build of materials)
Conclusion
At first the circuit didn’t work correctly. After a couple of minutes debugging it was
clear that there was a single wire connection missing.
The circuit then worked correctly, i.e. the LED will only light when one of the two
switches is flicked to the on position.
The output voltage when F=1 was not exactly 5V this could be due to the fact that
the circuit has a small resistance and tiny voltage dividers could have an effect on the
5V output.
Fig. 6. Circuit on Digital Designer
1
Module: Digital Systems 1 EE4522
Lab: 3
Student name: Ciarán O’ Mara
Student ID: 15154394
Lab Purpose
Analyse, build and test a 3- input parity generator
Sum-of-products. Product-of-sums.
Compare measurement results versus simulation
Lab Procedure
Get wires, capacitor and logic chip.
Study the circuit diagram and digital designer platform information before building the circuit.
Ensure power is off and begin to build the circuit step by step.
Test circuit by flicking the three switches to the different possible positions. The LED should
only light when an odd amount of switches are on.
Then improve the circuit, utilising the left over gates to turn the odd parity generator into an
even parity generator.
If the circuit doesn’t work debug the circuit using the logic probe.
Build of Materials
Part Quantity
74HC86 1
10uF Capacitor 1
Power Supply 1
Digital Designer 1
Wires -
XOR GATE TRUTH F= XY=X'Y+XY'
An exclusive OR gate is an or gate but will only give a 1 at its output when either X is a 1 or Y is a but
not when both are. The 74HC86 contains 4 XOR which is one more than is needed to create an even
and odd parity generator. An OR gate can also be used to create an inverter.
Fig 1. Build of Materials
2
ODD-PARITY GENERATOR - F = ((XY) Z)
The odd parity generator consists of two XOR gates where the output of the first gate is fed into one
of the inputs to the second gate. The inputs are controlled by three switches. The table below displays
the output F all possible combinations of the three switches.
Odd-parity function
F = (X’Y’Z)+(X’YZ’)+(X’YZ)+(XYZ) Sum of the Products - Maxterms
F = (X+Y+Z)(X+Y’+’Z)(X’YZ’)(X’Y’Z) Product of the Sums - Minterms
An odd-parity 4-bit packet would consist of the 3 inputs such as X, Y and Z and the output F being the
most significant bit in this example being the parity bit to ensure that there’s an odd number of bits
in the 4-bits. This can be used to a certain degree of accuracy to verify transmitted data. One will be
able to tell whether there is an odd even number of bits in the data based on whether a 1 was added
to the left or not. (examples - 1011, 1101, 0001 etc.)
Example:
Input – 101
Expected Output – 1101
Actual output – 1101
X Y Output
0 0 0
0 1 1
1 0 1
1 1 0
Odd-Parity Truth Table
X Y Z F
0 0 0 0
0 0 1 1
0 1 1 0
0 1 0 1
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
Fig 2. Diagram of IC
Fig 4. Simetrix odd-parity generator schematic
Fig 5. Odd-parity truth table
3
In this example based on the fact that an odd parity generator is being used and the parity bit is a 1,
we can tell that the data being transmitted has an even number of 1s
This method of data verification will not work in the case of certain bits flipping an error will not be
returned. For example, if the input is 010 and the expected output is 0010, however the third and
second bit flip resulting in 0110 this will not return an error as there is still an even number of bits and
the parity bit indicates that there should be an odd amount. If the most significant bit flips, there you
will also have a problem.
EVEN-PARITY GENERATOR – F = ((XY) Z)’
The Even parity generator consists of two XOR gates which creates an odd-parity generator. Using an
inverter this can be changed into an Even-parity generator. A third XOR gate be turned into an inverter
by connecting one of the inputs to 5V and the other to the output of the odd-parity generator.
Even-parity function
F = (X’Y’Z’)+(X’YZ)+(X’YZ’)+(X’Y’Z) Sum of the Products - Maxterms
F = (X+Y+Z’)(X+Y+’Z)(X’YZ)(X’Y’Z’) Product of the Sums – Minterms
A 4-bit even packet is the same as the first odd-parity packet except the most significant bit is added
to ensure there’s an even number of bits in the packet. (example - 1100, 1001, 0101 etc.)
Example:
Input – 111
Expected Output – 1111
Actual output – 1111
Even-Parity Truth Table
X Y Z F
0 0 0 1
0 0 1 0
0 1 1 1
0 1 0 0
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
Fig 6. Simetric even-parity generator schematic
Fig 7. Even-parity truth table
4
The fact that the first bit is a 1 and an even parity bit is being used in this example one can tell that
the packet has an odd number of bits as a 1 was added to make it even.
The same problem as the odd parity bit could be encountered i.e. if certain bits were flipped no error
would appear and the data transmitted would appear correct even though it has lost or gained bits.
74HC86
X Y Z
F_Odd-Parity
F_Even-Parity
GRD
5V
Fig 8. Simetrix simulation results
Fig 9. Circuit diagram created using Fritzing
5
Conclusion
The odd-parity logic circuit worked as expected and can be useful in verifying the data transfer
of bits.
An XOR gate can be used as an inverter just by connecting one of it’s legs to power and the
other to the signal that you wish to invert.
The product of the sums and sums of the product are used to create the Boolean function for
the logic circuit.
F_odd-parity F_even-parity
Fig 10. Odd and Even parity outputs from lab X
Z Y
1
Module: Digital Systems 1 EE4522
Lab: 4
Student name: Ciarán O’ Mara
Student ID: 15154394
Lab Purpose
Design of a 2-bit binary to 7-segment decoder
Prototype and test the circuit. Debug if necessary.
Model and simulate.
Lab Procedure
The first step in this lab was to design the circuit with use of a truth table and k-maps for each
of the outputs.
Using the seven segment display construct a truth table for the for possible combinations.
The table should be constructed so that the binary input will display it’s decimal conversation
on the seven segment display at the output (remembering that a 0 will turn the LED on as the
component is already connected to power).
Draw the k-maps out for the seven different letters write the expressions and simplify with DE
Morgan’s theorem where necessary so that a minimum amount of components will be used.
Combine the expression to draw the circuit diagram.
Build the circuit systematically starting a a and finishing at g debugging as you go to ensure
the final circuit will work as intended.
Connect the outputs to the LEDs through a resistor.
Test the circuit for each of the 4 configurations.
Build of Materials
Part Quantity
74HC08 1
74HC04 1
74HC32 (Not used) 1
7 segment display 1
10uF Capacitor 2
330Ω Resistors 7
Power Supply 1
Digital Designer 1
Wires -
Fig 1. Build of Materials
2
De Morgan’s Theorem
In the lab we were given 3 different ICs each consisting of different logic gates (AND, OR & Invertors).
When design the circuit it’s useful to take into consideration how much materials are being used.
With the use of De Morgan’s theorem the expression for each of the outputs can be converted to a
form where only an AND gate is needed. This means that there is no need to use the OR gate and both
material and money is being saved. (F=u+v ⇒ F'=u'v' ⇒ F=(u'v')'.)
Used Not Used
74HC08 consists of 4 AND gates 74HC32 Consists of 4 OR gates
74HC04 Consists of 5 Inverters
7 Segment display
The circuit has two inputs, 11 being the highest number, 3 in decimal terms. The
function of the digital circuit design is to decode the binary input to light the 7
segment display according to the binary input.
As shown in the figure below the display is connected to power. This means that
to get a segment to light up its pin must be a digital 0 or a LOW.
Each pin must be dealt with separately however as shown below segment b is
constantly on therefore always connected to ground. Also since segment a and
d are on and off at the same time they can be connected to the same output
with a gate to boast the output to power two segments. All segments must also
be connected through a 330Ω resistor.
Fig 2. Logic ICs used and not used
Fig 3. 7 Segment Pins
3
Testing using Logic Lab
The circuit was drawn and on ‘The Logic Lab’ by neuroproductions. This gives a very visual idea of how
the circuit is operating while also acting as a tool to test the configurations.
The outputs were inverted so that the LEDs would light as the segments in the display need a 0 yet yet
the LEDs in the Logic Lab need a 1 to light. Otherwise the circuit is the same as the one built in the lab.