Professional Documents
Culture Documents
Sl. No. Experiment No 1a 3: Analog and Digital Electronics Laboratory (17CSL37)
Sl. No. Experiment No 1a 3: Analog and Digital Electronics Laboratory (17CSL37)
Sl. No. Experiment No 1a 3: Analog and Digital Electronics Laboratory (17CSL37)
CONTENTS
Sl. Experiment Page
No. No
1a Design and construct a Schmitt trigger using Op-Amp for given UTP and LTP values 3
and demonstrate its working.
3 Design and implement an Astable Multivibrator circuit using 555 timer for a given 11
frequency and duty cycle.
4 Design and implement Half adder, Full Adder, Half Subtractor, Full Subtractor using 16
basic gates.
5a Given a 4-variable logic expression, simplify it using Entered Variable Map and 22
realize the simplified logic expression using 8:1 multiplexer IC.
6 Design and implement code converter I) Binary to Gray (II) Gray to Binary Code 27
using basic gates.
7 Design and verify the Truth Table of 3-bit Parity Generator and 4-bit Parity Checker 31
using basic Logic Gates with an even parity bit.
8a Realize a J-K Master / Slave Flip-Flop using NAND gates and verify its truth table. 34
9a Design and implement a mod-n (n<8) synchronous up counter using J-K Flip-Flop ICs 37
and demonstrate its working.
11 Generate a Ramp output waveform using DAC0800 (Inputs are given to DAC through 46
IC74393 dual 4-bit binary counter).
SIMULATION
1b Design and implement a Schmitt trigger using Op-Amp using a simulation package 49
for two sets of UTP and LTP values and demonstrate its working.
5b Design and develop the Verilog /VHDL code for an 8:1 multiplexer. Simulate and 53
verify its working.
8b Design and develop the Verilog / VHDL code for D Flip-Flop with positive-edge 54
triggering. Simulate and verify its working.
9b Design and develop the Verilog / VHDL code for mod-8 up counter. Simulate and 55
verify its working.
List of IC Numbers
IC Number
NAND Gate (2-input) 7400
NAND Gate ( 3-input) 7410
NOR Gate (2-input) 7402
NOT Gate 7404
AND Gate (2-input) 7408
AND Gate (3-input) 7411
OR Gate (2-input) 7432
XOR Gate (2-input) 7486
Multiplexer 74251
7-Segment 7447
Decade Counter 7490
JK Flip Flop 7476
Op-Amp µA741
4-bit Binary Counter 74393
1a Design and construct a Schmitt Trigger using Op-Amp for given UTP and LTP values
and demonstrate its working.
Aim : To design and implement a Schmitt trigger using Op-Amp for given UTP and LTP
values.
Components :
Background:
Schmitt Trigger is an Op-Amp circuit which converts an irregular input waveform into a
rectangular waveform. It is an active circuit which converts an analog input signal to a
digital output signal.
The circuit is named a “trigger” because the output retains its value until the input changes
sufficiently to trigger a change. The input voltage triggers the output voltage every time it
exceeds the certain voltage levels (UTP and LTP).
In a Inverting Schmitt trigger, the input voltage at which the output switches from +Vsat
to –Vsat is called Upper Trigger Point (UTP). The input voltage at which output
switches from –Vsat to +Vsat is called Lower Triggering Point (LTP).
The difference between the two trip points is called Hysteresis. The Hysteresis loop can be
shifted to either side of zero by connecting a voltage source.
It is an inverting comparator circuit with a positive feedback. The amplitude of the output
square wave is independent of the peak-to-peak value of the input waveform.
Formulas:
𝐑𝟏 × 𝐕𝐫𝐞𝐟 𝐑𝟐 × 𝐕𝐬𝐚𝐭
UTP = +
𝐑𝟏 + 𝐑𝟐 𝐑𝟏 + 𝐑𝟐
𝐑𝟏 × 𝐕𝐫𝐞𝐟 𝐑𝟐 × 𝐕𝐬𝐚𝐭
LTP = −
𝐑𝟏 + 𝐑𝟐 𝐑𝟏 + 𝐑𝟐
Design:
For the given values of UTP and LTP, find out the values of Vref, R1 and R2. Vsat is fixed at
12V.
𝟐 × 𝐑𝟏 × 𝐕𝐫𝐞𝐟
UTP + LTP = - - - - - - (1)
𝐑𝟏 + 𝐑𝟐
𝟐 × 𝐑𝟐 × 𝐕𝐬𝐚𝐭
UTP - LTP = - - - - - - (2)
𝐑𝟏 + 𝐑𝟐
1. Given UTP = 1V and LTP = -1V, Choose Vsat = 12V [ Without Reference Voltage ]
2 × R1 × Vref
UTP + LTP = 0 = - - - - - - (1)
R1 + R2
2 × R2 × 12
UTP – LTP = 2 = - - - - - - (2)
R1 + R2
12 × R2 = R1 + R2
R1 = 11 × R2
When UTP = -LTP, then Vref = 0 V (No need to connect Vref Voltage Source)
2. Given UTP = 4V and LTP = 2V, Choose Vsat = 12V [ With Reference Voltage ]
2 × R1 × Vref
UTP + LTP = 6 = - - - - - - (1)
R1 + R2
6 × ( R1 + R2 ) = 2 × R1 × Vref
2 × R2 × 12
UTP – LTP = 2 = - - - - - - (2)
R1 + R2
2 R1 + 2 R2 = 24 R2
2R1 = 22 R2
R1 = 11 R2 - - - - - - (3)
Substitute Eq. 3 in Eq 1
6 × ( 11 R2 + R2 ) = 2 × 11 R2 × Vref
72 R2 = 22 R2 × Vref
Vref = 3.27 V
Procedure:
2. Verify the Probes for good working condition using the CRO’s test square waveform.
4. Set the Frequency of Function Generator in between 100 - 300 Hz and Peak to Peak
Voltage to 20V.
5. Compute the values of Resistors R1, R2 and Vref for the given values of UTP and LTP.
6. Choose the nearest available Resistor values for making the circuit.
7. Connect the Function Generator to the Pin 2 of IC µA-741 using Positive end of the Probe.
8. Make the connections as shown in the circuit diagram and switch on the power supply.
10. Observe the Output waveform at pin 6 of IC µA-741on Channel-2 of CRO by connecting
through the positive end of the Probe.
12. After Observing the Input and Output waveforms on the CRO. Put the CRO to the X-Y
Mode and Observe the Hysterisis Voltage Plot. Adjust the Frequency of the Function
Generator to get the UTP and LTP values near to the design.
13. Note the Values of UTP and LTP from Hysterisis Voltage Plot by considering the Channel
1 Volts/Div setting on CRO.
Result: The Schmitt Trigger is designed and implemented with the following values.
UTP LTP
Sl. UTP LTP
(Practical) (Practical)
No (Theoretical) (Theoretical)
(CRO Value × Volts/Div Value) (CRO Value × Volts/Div Value)
Aim : To design and implement an Op-Amp Relaxation Oscillator for the given Frequency.
Components :
Background:
Relaxation oscillators are non-sinusoidal oscillators which generate triangular, square and
pulse waveforms using a circuit building block known as Multivibrators.
The op-amp operates in the saturation region. Here, a fraction (R2/(R1+R2)) of output is
fed back to the non-inverting input terminal. Hence the reference voltage is (R2/(R1+R2))
Vo and may take values as +(R2/(R1+R2)) Vsat or - (R2/(R1+R2)) Vsat.
The output is also fed back to the inverting input terminal after integrating by means of a
low-pass RC combination. Whenever the voltage at inverting input terminal just exceeds
reference voltage, switching takes place resulting in a Square Wave output.
Formula:
Circuit Diagram:
Waveforms on CRO
Calculations:
T = 1/f = 1/1K = 1 ms
Choose C = 0.1µF, R1 = R2 = 1K Ω
1m = 2.196 × R × 0.1µ [Substituting C and T in Eq. 1]
R = 4.55 K Ω
3. Given Frequency f = 2 K Hz
4. Given Frequency f = 5 K Hz
Procedure:
1. Check all the components using a Multimeter. Verify the Probes for good working
condition using the CRO’s test square waveform.
4. Choose the nearest available Resistor values for making the circuit.
8. Note the Value of Time Period of Rectangular Waveform by considering the Channel 2
Time/Div setting on CRO and calculate the Frequency.
Result: The Relaxation Oscillator is designed and implemented with the following values.
3 Design and implement an Astable Multivibrator circuit using 555 Timer for a given
Frequency and Duty Cycle.
Aim : To design and implement an Astable Multivibrator circuit using 555 Timer for a given
Frequency and Duty Cycle.
Components :
Background:
Monostable Multivibrator : In this circuit one of the states is stable and another
state is unstable. A trigger pulse causes the circuit to enter the unstable state. After
entering the unstable state, the circuit will return to the stable state after a set time.
Bistable Multivibrator : The circuit is stable in both the states. It can be flipped
from one state to the other by an external trigger pulse. This circuit is also known
as a flip-flop. It can be used to store one bit of information.
Astable Multivibrator Mode of 555 Timer IC is also called as Free Running or Self-
Triggering Mode. It doesn’t have any stable state, it has two quasi stable state (High and
Low). No external triggering is required in Astable Mode, it automatically interchanges
between the two states after an interval of time, hence generates a rectangular waveform.
Using 555 Timer IC, one can generate precise time duration of High and Low output, from
micro seconds to hours which is determined by the external resistors (R1 and R2) and a
capacitor (C).
Design:
1
Let, Frequency = f Time Period = T =
f
For a given Frequency (f) and Duty Cycle (D), Find T, TC and TD
Choose Capacitance C = 0.1μF in both the cases and find the R1 and R2 Resistor values by
substituting C in the respective equations.
Output Waveforms
Calculations:
T = 1/f = 1 ms
D = 0.7 = TC / T Hence TC = 0.7 ms and TD = T - TC = 1 - 0.7 = 0.3 ms
Choose C = 0.1μ F and by substituting the values we have
TD = 0.693 R2 C
0.3 = 0.693 R2 0.1 μ F ---------------- (2)
T = 1/f = 1 ms
D = 0.5 = TC / T Hence TC = 0.5 ms and TD = T - TC = 1 - 0.5 = 0.5 ms
Choose C = 0.1μ F and by substituting the values we have
TD = 0.693 R2 C
0.5 = 0.693 R2 0.1 μ F ---------------- (2)
Procedure:
2. Verify the Probes for good working condition using the CRO’s test square waveform.
4. For the given Frequency and Duty Cycle, Compute the values of Resistors R1 and R2.
5. Choose the nearest available Resistor values for making the circuit.
6. Use the Diode only when the given Duty Cycle <= 50%
7. Make the connections as shown in the circuit diagram and switch on the power supply.
8. Observe the Capacitor Voltage waveform at pin 6 of 555 Timer on Channel-1 of CRO by
connecting through the positive end of the Probe.
9. Observe the Output waveform at pin 3 of 555 Timer on Channel-2 of CRO by connecting
through the Positive end of the Probe.
11. Note the TC and TD values of output waveform by considering the Time/Div settings in the
CRO and calculate the Frequency of output waveform.
Result: The Astable Multivibrator is designed and implemented with following values.
TC TD Frequency Duty
Sl. Frequency Duty Cycle (CRO Value (CRO Value Period Cycle
(Practical) (Practical)
No (Theoretical) (Theoretical) × Time/Div × Time/Div T = TC + TD
Value) Value) f = 1/T D = TC / T
4a Design and implement Half Adder, Full Adder, Half Subtractor, Full Subtractor using
Basic Gates.
Aim : To design and verify the working of Half adder, Full Adder, Half and Full Subtractor.
Components :
Background:
An adder is a digital circuit that performs addition of numbers. Adders are used in the
arithmetic logic units, to calculate addresses, table indices, increment and decrement
operators, and similar operations.
The Half Adder adds 2 one bit binary digits and produces two outputs as sum and carry.
The carry signal represents an overflow into the next digit of a multi-digit addition.
A one-bit Full Adder adds three one-bit numbers, represented as A, B, and Cin. A and B
are the operands and Cin is a bit carried in from the previous less-significant stage.
Subtractor is used to subtract two binary number (digit) and provides Difference and
Borrow as outputs.
The Half Subtractor is a combinational circuit which is used to perform subtraction of two
bits. It has two inputs X, Y and two outputs the Difference (D = X - Y) and Borrow Out
(Bout).
The Borrow Out signal is set when the Subtractor needs to borrow from the next digit in a
multi-digit subtraction. Bout = 1, when X < Y. Since X and Y are bits, Bout = 1 if and
only if X = 0 and Y = 1.
The Full Subtractor is a used for subtraction of three input bits: X, Y, and Bin (Borrow in).
It generates two output bits, the Difference (D) and Borrow Out (Bout). Bin is set when
the previous digit borrowed from X. A Full Subtractor is represented as X – Y – Bin.
Inputs Outputs
Carry Sum
A B
(Cout) (S)
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
S = A ̅̅𝐁̅̅ + ̅𝐀
̅̅̅ 𝐁 , Cout = A B
S = A , Cout = A B
Inputs Outputs
Carry in Carry out Sum
A B
(Cin) (Cout) (S)
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
Kmap
S = A C
Inputs Outputs
Borrow Difference
X Y
(Bout) (D)
0 0 0 0
0 1 1 1
1 0 0 1
1 1 0 0
D = X ̅̅̅
𝐘 + ̅̅̅
𝐗 𝐘 , Bout = ̅̅̅
𝐗 𝐘
Simplified Equation for Difference can be written as, D = X Y
Inputs Outputs
Borrow in Borrow out Diff
X Y
(Bin) (Bout) (D)
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 1 0
1 0 0 0 1
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
Kmap
D = X YBin
Bout = ̅̅̅̅̅
𝐗 𝐁𝐢𝐧 + Y Bin + ̅̅̅̅̅
𝐗 𝐘
Procedure :
1. Verify all the components and patch cords for their good working condition.
2. Connect A, B, Cin (X, Y, Bin) to the input ports and S, Cout (D, Bout) to the output ports
of the trainer kit, such that A (X) is MSB bit.
3. Use IC 7404 (NOT), 7408 (2-input AND), 7486 (2-input XOR), 7432 (2-input OR) and
make the connections as shown in the circuit diagrams.
5. Provide the inputs to circuit via trainer kit switches (A, B, Cin, X, Y, Bin) and verify the
truth table.
6. It can be observed the sum and difference equations of Adders and Subtractors are same,
thus the same connections can be retained while conducting the experiment.
Result : The circuit designed is verified for the truth tables of Half Adder, Full Adder, Half and
Full Subtractor.
5a Given a 4-variable logic expression, simplify it using Entered Variable Map and
realize the simplified logic expression using 8:1 multiplexer IC.
Aim : To simplify a given 4-variable logic expression using EVM and realize it using a 8:1
Multiplexer IC.
Components :
Background:
Multiplexer means many into one. It is a circuit with many inputs but only one output. By
applying control signals, it can steer any input to the output.
The number of inputs to a multiplexer is multiple of 2 (2, 4, 8, 16, …) but the number of
output is always one. Hence, it is also called as data selector. Control inputs are termed as
select inputs.
The circuit has n input signals, m control signals and 1 output signal. m control signals
can select at the most 2m input signals, thus n <= 2m.
In Entered Variable Map, one of the input variable is placed inside the output of truth
table, this variable is called as Map Entered Variable (MEV).
The method records how this variable is related to the output. Hence, truth table size is
reduced by a degree of one.
For instance, a 4 variable problem has 24 = 16 entries in truth table, using EVM method it
can be reduced to 24 - 1 = 23 = 8.
Inputs Outputs
Observation
A B C ̅̅̅̅
𝐄𝐍 Q ̅
𝐐
0 0 0 0 D0 ̅̅̅̅
D0 If EN pin is 0 and input is 0 0 0 then output will be D0
0 0 1 0 D1 ̅̅̅̅
D1 If EN pin is 0 and input is 0 0 1 then output will be D1
0 1 0 0 D2 ̅̅̅̅
D2 If EN pin is 0 and input is 0 1 0 then output will be D2
0 1 1 0 D3 ̅̅̅̅
D3 If EN pin is 0 and input is 0 1 1 then output will be D3
1 0 0 0 D4 ̅̅̅̅
D4 If EN pin is 0 and input is 1 0 0 then output will be D4
1 1 0 0 D6 ̅̅̅̅
D6 If EN pin is 0 and input is 1 1 0 then output will be D6
1 1 1 0 D7 ̅̅̅̅
D7 If EN pin is 0 and input is 1 1 1 then output will be D7
EVM Method :
Let’s consider A, B and C variables to be fed as select inputs and fourth variable D to be
present as data input using Entered Variable Map method.
All combinations of 3 select inputs and the data input is written in the truth table.
Corresponding Q value (the output) is written using the given logic expression.
Observe how the MEV variable D is related to the output and make the corresponding
entries in the MEV map.
For all 8 combinations of control inputs, the corresponding 8 data inputs for the MUX are
calculated.
Using these 8 data inputs, the 8:1 MUX circuit can be designed and implemented.
̅̅̅̅ is the active low strobe pin, which activates the MUX IC.
𝐄𝐍
Entry in MEV Map for all possible values of MEV (D) and Output (Q)
6 0 1 1 0 0
̅.0 +D.1 =D
D3 = D
7 0 1 1 1 1
8 1 0 0 0 X
̅.X +D.X =X
D4 = D
9 1 0 0 1 X
10 1 0 1 0 1
̅.1 +D.1 =1
D5 = D
11 1 0 1 1 1
12 1 1 0 0 X
̅.X +D.X =X
D6 = D
13 1 1 0 1 X
14 1 1 1 0 1
̅.1 +D.X =1
D7 = D
15 1 1 1 1 X
Circuit :
Procedure :
1. Verify all the components and patch cords for their good working condition.
2. Connect A, B, C, D to the input ports and Q to the output port of the trainer kit, such that
A is MSB bit and D is LSB bit.
3. Don’t care (X) entries in the data input can be connected to either Ground or Vcc.
̅ is required.
5. Connect IC 74251 pins to pin 2 of IC 7404 where ever D
6. Pin 7 is active low strobe (enable) and is connected to ground. Pin 6 is not connected.
9. Provide the input data to circuit via trainer kit switches (A, B, C and D) and verify the
truth table.
Result : The circuit designed using multiplexer is verified for the given logical expression.
6 Design and implement code converter I) Binary to Gray II) Gray to Binary Code using
Basic Gates.
Aim : To design and realize a Binary to Gray and Gray to Binary Code converter using Basic
Gates.
Components :
Background:
The logical circuit which converts binary code to equivalent gray code is known as binary
to gray code converter. The gray code is a non weighted code.
The successive gray code differs in one bit position only that means it is a unit distance
code. It is also referred as cyclic code.
1. The MSB bit of Binary Code and Gray Code are same.
2. For a N-bit Binary Code, The Mth Bit of a Gray Code will be
GM = BM XOR BM+1
1. The MSB bit of Gray Code and Binary Code are same.
2. For a N-bit Gray Code, The Mth Bit of a Binary Code will be
G3 = B3 G2 = B2
G1 = B1 G0 = B0
1 0 0 1 1 1 1 0
1 0 0 0 1 1 1 1
B3 = G3 B2 = G2 G
B1 = G1 GGG1 B2 B0 = G0 G1GG3 = G0 B1
Procedure:
1. Verify all the components and patch cords for the good working condition.
2. For Binary Code to Gray Code, Connect B3, B2, B1, B0 to the input ports of trainer kit
such that B3 will be MSB bit and B0 is LSB Bit. Connect G3, G2, G1, G0 to the output
ports of the trainer kit such that G3 is the MSB bit and G0 is LSB Bit.
3. For Gray Code to Binary Code converter, connect G3, G2, G1, G0 to the input ports of
trainer kit such that G3 will be MSB bit and G0 is LSB Bit. Connect B3, B2, B1, B0 to the
output ports of the trainer kit such that B3 is the MSB bit and B0 is the LSB Bit.
4. Make the connections as shown in the circuit. Connect the VCC and Ground to all the IC’s.
5. For all combinations of input codes verify the corresponding converted output codes.
Result : The circuit designed is verified for the 4-bit Binary code to Gray code converter and
Gray code to Binary code converter.
7 Design and verify the Truth Table of 3-bit Parity Generator and 4-bit Parity Checker
using basic Logic Gates with an even parity bit.
Aim : To design and implement Parity Generator and Parity Checker for even parity using
Basic Gates.
Components :
Background:
Parity of a binary number is defined based on number of 1’s present in it. If the number of
1’s present is odd then the binary number is said to have odd parity. If the number of 1’s
present is even then the binary number is of even parity.
Even Parity Generator, generates an additional bit which when padded with the input bits
produces an even parity binary number.
Parity Checker generates the output as 1 if the input binary number is of odd parity and 0
if input is of even parity.
Input Output
Decimal A B C P A B C
0 0 0 0 0 0 0 0
1 0 0 1 1 0 0 1
2 0 1 0 1 0 1 0
3 0 1 1 0 0 1 1
4 1 0 0 1 1 0 0
5 1 0 1 0 1 0 1
6 1 1 0 0 1 1 0
7 1 1 1 1 1 1 1
P = ̅̅̅̅̅
A B C + ̅̅̅
A B ̅̅̅
C + A ̅̅̅̅̅̅
BC + ABC
P = ̅̅̅ B C + B ̅̅̅
A ( ̅̅̅ C ) + A ( ̅̅̅̅̅̅
BC + BC)
P=A B C
Inputs Output
Decimal
A B C D P
0 0 0 0 0 0
1 0 0 0 1 1
2 0 0 1 0 1
3 0 0 1 1 0
4 0 1 0 0 1
5 0 1 0 1 0
6 0 1 1 0 0
7 0 1 1 1 1
8 1 0 0 0 1
9 1 0 0 1 0
10 1 0 1 0 0
11 1 0 1 1 1
12 1 1 0 0 0
13 1 1 0 1 1
14 1 1 1 0 1
15 1 1 1 1 0
P = A BCD
Procedure:
1. Verify all the components and patch cords for the good working condition.
2. For Even Parity Generator, connect A, B, C to the input ports and A, B, C, P to the output
ports of the trainer kit.
3. For 4-bit Parity Checker, connect A, B, C, D to the input ports and P to the output port of
the trainer kit.
6. For all combinations of inputs verify the corresponding truth tables. If the output P is 1
then the input binary number is of odd parity and if P is 0 then input is of even parity.
Result : The circuit implemented is verified for the Parity Generator and Checker.
8a Realize a J-K Master / Slave Flip-Flop using NAND gates and verify its truth table.
Components :
Background:
A flip-flop or latch is a circuit that has two stable states and can be used to store state
information. A flip-flop is a bistable multivibrator. The circuit can be made to change
the state by applying signals to one or more control inputs and will have one or two
outputs.
A flip-flop stores a single bit of data, one of its two states represents a “one” and the
other represents a “zero”. Such data storage can be used for storage of state, and such a
circuit is described as sequential logic.
When used in a finite-state machine, the output and next state depend not only on its
current input, but also on its current state. It can also be used for counting of pulses, and
for synchronizing variably-timed input signals to some reference timing signal.
̅ +𝐊
Qnext = J 𝐐 ̅Q
Circuit Diagram:
J K CLK Q ̅
𝐐
0 0 Pos – Edge No Change
0 1 Pos – Edge 0 1
1 0 Pos – Edge 1 0
1 1 Pos – Edge Toggle
Procedure:
1. Verify all the components and patch cords for the good working condition.
3. The circuit needs two 3-input NAND gate and seven 2-input NAND gates.
4. Take two 2-input NAND gate IC’s (each IC contains four 2-input NAND gates) and one 3
input NAND gate (contains three 3-input NAND gate).
5. Place the 3-input NAND gate in first IC base, 1st 2-input NAND gate IC in 2nd IC base and
2nd 2-input NAND gate in 3rd IC base of the trainer kit.
7. Connect the clock input to Monopulse (High) or 1Hz TTL pin of the trainer kit.
9. Provide input data to the circuit via input switches and verify the truth table.
9a Design and implement a mod-n (n<8) synchronous up counter using J-K Flip-Flop ICs
and demonstrate its working.
Aim : To design a synchronous up counter for Mod N using J-K Flip-Flop ICs
Components :
Background:
In digital logic and computing, a counter is a device which stores (displays) the number of
times a particular event or process has occurred, often in relationship to a clock signal.
A synchronous counter is one whose output bits change state simultaneously, such a
counter circuit can be built from JK flip-flop by connecting all the clock inputs together,
so that each and every flip-flop receives the same clock pulse at the same time.
All individual output bits changing state at exactly the same time in response to the
common clock signal with no ripple effect i.e. with no propagation delay.
By examining the four-bit binary count sequence, it is noticed that just before a bit toggles,
all preceding bits are “high”. Thus a synchronous up-counter can be implemented by
toggling a bit, when all of the least significant bits are at logic high state.
For example, bit 1 toggles, when bit 0 is high. Bit 2 toggles, when both bit 1 and bit 0 are
high. Bit 3 toggles when bit 2, bit 1 and bit 0 are high.
IC 7476 contains 2 JK flip-flops, when Preset (PRE) pin is low, the flip flop value is set to
1. When the Clear (CLR) pin is low, the flip flop value is set to 0.
Design:
Procedure :
1. Verify all the components and patch cords for the good working condition.
2. Connect QA, QB and QC to output ports of the trainer kit, such that QA is LSB and QC is
MSB.
5. Connect the clock input to Monopulse (High) or 1Hz TTL pin of the trainer kit.
7. Give the power supply to the trainer kit and verify the truth table.
The counter must be reset when it reaches 101, thus CLR pin must be low when QA and
QC are high. Hence, remove the Vcc connection from CLR pins. Connect QA and QC
to NAND gate inputs, NAND gate output to CLR pins of all JK Flip Flops.
Mod 2 counter can be obtained by connecting QB to both the inputs of NAND gate and
output of NAND gate connected to CLR pins of all JK Flip Flops.
Mod 3 counter can be obtained by connecting QA and QB to the inputs of NAND gate and
output of NAND gate connected to CLR pins of all JK Flip Flops.
Mod 4 counter can be obtained by connecting QC to both the inputs of NAND gate and
output of NAND gate connected to CLR pins of all JK Flip Flops.
Mod 6 counter can be obtained by connecting QB and QC to the inputs of NAND gate and
output of NAND gate connected to CLR pins of all JK Flip Flops.
Mohan H G, Assistant Professor, Dept. of CSE, JNNCE, Shimoga. Page 39
Analog and Digital Electronics Laboratory (17CSL37)
Mod 7 counter can be obtained by connecting QA, QB and QC to the inputs of NAND
gate and output of NAND gate connected to CLR pins of all JK Flip Flops. (Use 3 input
NAND Gate IC 7410).
Remove the Vcc connection from CLR pins for all cases, except Mod 8.
Components :
Background:
A counter is a register that goes through a predetermined sequence of states upon the
application of input pulses. In asynchronous counter a clock signal is provided for one
flip-flop and its output is provided as clock source for next flip-flop. The output of
asynchronous counter is not synchronized with clock signal.
A decade counter follows a sequence of 10 states and returns to zero after the count of
Nine. Such a counter must have atleast 4 flip flops to represent each decimal digit,
represented by a binary code with 4 bits.
IC 7490:
The 74LS90 is a simple counter, it can count from 0 to 9 cyclically in its natural mode. It
counts the input pulses and provides the output as a 4-bit binary number through pins QA,
QB, QC and QD.
The chip can count up to other maximum numbers and return to zero by changing the
modes of 7490. The modes are set by changing the connection of reset pins R1 - R4.
For example, if either R1 & R2 are high or R3 & R4 are ground, then it will reset QA, QB,
QC and QD to 0000. If reset pins R3 & R4 are high, then the count on QA, QB, QC and
QD goes to 1001.
Input Output
R1 R2 R3 R4 QD QC QB QA
H H L X 0 0 0 0
H H X L 0 0 0 0
L X H H 1 0 0 1
X L H H 1 0 0 1
L X L X COUNT
X L X L COUNT
L X X L COUNT
X L L X COUNT
It can be noted that the outputs will be set to 0000, whenever R1and R2 are high. And the outputs
will be set to 1001, whenever R3and R4 are high. In all other cases, the outputs will follow the
counter.
Procedure :
3. Pins QA (pin 12), QB (pin 9), QC (pin 8) and QD (pin 11) are connected to Pins of IC
7447.
5. Reset pins R1, R2, R3 and R4 are connected to GND, i.e pin 2, pin 3, pin 6 and pin 7 to
GND.
7. Connect a, b, c, d, e, f and g pins of IC 7447 to the 7- Segment Display on the Trainer Kit.
8. Apply clock pulse using mono-pulse or TTL, the counter starts counting from “0” to “9”
repeatedly on 7-Segment Display. This verifies the working of a Decade Counter.
Mod 5 counter must count from 0 to 4, which means when the output becomes 0101, it
must be reset to 0. The counter can be reset to 0 by making R1 and R2 values as 1 (High).
Observe the number 0101, where QD = 0, QC = 1, QB = 0 and QA = 1.
Consider only those output bit values which are high. In this case QC and QA are high.
Thus, the counter must be reset to 0 when ever QC and QA are high.
Connect the QC to R1 and QA to R2 pins of IC 7490, When ever QC and QA are high,
the counter will be reset to 0.
Mod 4 counter must count from 0 to 3, which means when the output becomes 0100, it
must be reset to 0. Where QD = 0, QC = 1, QB = 0 and QA = 0.
The counter must be reset to 0 when ever QC is high. Hence, directly connect QC to R1
and R2 pins of IC 7447.
Mod R1 R2
2 QB QB
3 QA QB
4 QC QC
5 QC QA
6 QC QB
7 QA . QC QB
8 QD QD
9 QD QA
Result : The circuit designed is verified for the given value of Mod N.
11 Generate a Ramp output waveform using DAC0800 (Inputs are given to DAC through
IC74393 Dual 4-Bit Binary Counter).
Components :
Background:
Digital to analog converter (DAC) is used to get an Analog voltage corresponding to the
input digital signal. The process of Digital to Analog conversion is done by using
DAC0800 IC.
The output voltage is held at the current value until the next input number is latched
resulting in a piecewise constant output. The DAC IC is driven by a Dual 4-Bit Binary
Counter IC74393.
Pin Diagrams:
Circuit :
Procedure :
4. Also connect Pin 8, 9, 10 and 11 of IC 74393 to output ports of the Trainer kit.
Mohan H G, Assistant Professor, Dept. of CSE, JNNCE, Shimoga. Page 47
Analog and Digital Electronics Laboratory (17CSL37)
7. Apply clock pulse using mono-pulse, the counter starts counting from “0” to “15”
repeatedly. On each count note the Current and Voltage value on the Multimeter.
Graph :
Result:
2. Click on File → New, a circuit window will appear. Maximize the circuit window.
3. Construct the circuit by selecting the components from the Components Bar, output devices
from Instruments Bar.
4. After finishing the circuit construction, click on the ‘save’ button and give a file name.
9. If any Window/Bars are not visible then Go to ‘View’ and enable them.
1b Design and implement a Schmitt trigger using Op-Amp using a simulation package
for two sets of UTP and LTP values and demonstrate its working.
Vref
Vary the R1, R2 and Vref values according to the given UTP and LTP and run the simulation.
Put the Oscilloscope to A/B or B/A Mode to view the Hysterisis Voltage Plot.
Results :
Vary the R1, R2 and R values according to the given Frequency and Run the Simulation.
Results :
Sl. No f T f T f T
(Theoretical) (Theoretical) (Practical) (Practical) (Simulation) (Simulation)
Sl. No R1 R2 R f 2 × R1 2 × R2 2×R f
2. Click on File → New Project. Type a Project name say ‘ADELAB’, select ‘HDL’ as Top
Level Module Type and click ‘Next’ button.
4. Click ‘New Source’ then, Type File Name, Select ‘Verilog Module’ and click ‘Next’ button.
5. Enter Module Name, Input and Output Port Variables. Enter the MSB, LSB values for
variables of type Array and click ‘Next’ button. Then click ‘Finish’ button.
7. Click on Source file (.v file) and type the Verilog code.
8. Double Click on ‘Check Syntax’ in the ‘Process for Source’ Tab to Compile the Verilog
code.
9. On the successful compilation a green tick mark is displayed, If there are any errors then a
red cross mark will appear and Errors will be displayed on the Console Tab.
10. Debug the Verilog program and ‘Check Syntax’ until green tick mark is displayed.
11. After the Successful Compilation, Double click on the ‘Launch ModelSim Simulator’ in the
‘Process for Source’ Tab. Now the ‘Objects’ and ‘Wave’ windows will be loaded.
12. Force the values according to the requirements and click on the ‘run’ icon.
13. Observe the Input and Output waveforms on the ‘Wave’ window and verify them.
Note:
To change the value of the variables during the simulation stage, right click on the variable
in the Wave window, select ‘Force’, type the value and click on ‘OK’ button.
If any of the Window is not visible, then go to ‘View’ menu and select them.
Right click on Wave Window and Select ‘Zoom In’ option according to the requirement.
5b Design and develop the Verilog /VHDL code for an 8:1 multiplexer. Simulate and verify
its working.
module MUX(S,D,Y);
input [2:0]S;
input [7:0]D;
output Y;
reg Y;
always @ (S or D)
case (S)
0: Y = D[0];
1: Y = D[1];
2: Y = D[2];
3: Y = D[3];
4: Y = D[4];
5: Y = D[5];
6: Y = D[6];
7: Y = D[7];
endcase
endmodule
8b Design and develop the Verilog / VHDL code for D Flip-Flop with positive-edge
triggering. Simulate and verify its working.
Input Output
CLK
D Q
Neg-edge X No Change
Pos-edge 0 0
Pos-edge 1 1
9b Design and develop the Verilog / VHDL code for mod-8 up counter. Simulate and verify
its working.
CLK is clock, RST is the reset input and Q is the output signal.
During simulation:
select ‘force’ then type the value ‘1’ and click on ‘OK’.
select ‘force’ then type the value ‘0’ and click on ‘OK’.
VIVA QUESTIONS
24. How to Generate Odd/Even Parity? 46. List the steps in designing a counter?
25. What are Grey Codes? 47. What is ADC? What is DAC?
48. Mention the types of DAC. 64. What changes will happen in Hysterisis
Curve if reference voltage is increased?
49. What are Monotonicity and Steady State
Accuracy Test? 65. Explain the working of Relaxation
Oscillator.
50. What is Resolution & Accuracy of a DAC?
51. What is the advantage of using R-2R over 66. What is Duty Cycle.
weighted resistor method? 67. Explain Duty Cycle High and Low.
52. Which is the fastest ADC? Why? 68. Define Ton / Thigh / Tcharging / Toff / Tlow /
Tdischarge ?
53. Mention the types of ADC.
69. List different Multivibrators.
54. Explain the structure of Verilog Code.
55. Which are the different types of Models in 70. Define Astable, Bistable and Monostable
Multivibrators.
HDL.
56. Explain assign, always, reg and wire 71. What are the features of CRO?
keywords. 72. How to calculate a Voltage value of
Signal in a CRO?
57. What is test bench and why it is needed ?
58. Write the Verilog code for de-multiplexer, 73. How to calculate a Time Period of Signal
in a CRO?
ring counter, Mod 5 counter and JK flip flop.
74. What is the use of Time/Div and
59. List some simulation tools for HDL.
Volts/Div settings in a CRO?
60. Explain the functionality of Op-Amp.
75. How to identify a Resistor value based on
61. How does Schmitt Trigger works? its Color Codes?
62. What is the significance of UTP and LTP 76. How Bread Board is Organized?
values.
77. What are Function Generators?
63. What is Hysterisis Curve ?