Lab5 DLD
Lab5 DLD
Lab 5
Date: .........29/05/2024....................
Group: .....8.......
I/ OBJECTIVES
Upon completion of this experiment, you are able to know:
• The operation of flip-flops.
• How to convert a flip-flop into other flip-flop.
• The operation of 7-segment LED, decoder IC and how to design counters
using flip-flops.
III/ CONTENTS
1. Flip Flops
a. The operation of JK – FF.
b. The operation of D – FF.
c. Convert JK-FF into D-FF.
2. Design asynchronous counters
a. Implement an asynchronous 3-bit up counter having M = 8 by using IC
74LS112
b. Implement an asynchronous 3-bit up counter having M = 5 by using IC
74LS112
c. Implement an asynchronous 3-bit down counter having M =8 by using IC
74LS112.
d. Implement an asynchronous 3-bit up counter having M=8, with a control
input for up/down counting using 74LS112 and 74LS86
3. Synchronous counters
a. Analyse and implement a synchronous counter
b. Design and implement a synchronous 2-bit counter M = 3
IV/ PRE-LAB
- Pre-lab includes reading the lab assignment in advance, answering the
questions or doing the calculations, and if necessary reviewing the material in the
textbook. All pre-lab preparation must be recorded and dated in the pre-lab sheet
prior doing the lab. The lab instructor will check your pre-lab write-up and sign
your pre-lab sheet.
- Answering all the questions and comments, draw the waveforms and
circuits, fulfill the truth tables and present diagrams on this experiment before doing
the lab.
- If you don’t prepare the pre-lab, you will not be allowed to do
experiment.
V/ EXPERIMENT
1. FLIP FLOPS
a. JK-FF (74LS112)
SW0
J K Q Q+
0 0 0 0
0 1 0 0
1 0 0 1
1 1 0 1
0 0 1 1
0 1 1 0
U2A 1 0 1 1
4
74LS112
SW2LED DISPLAY 3
J
PRE
Q
5
1 1 1 0
1
SW4/PULSE CLK
CLR
2 6
K Q
SW3LED DISPLAY
15
SW1
CLR ........ On the JK Flip-Flop, this was utilized to immediately insert a "1" in the Q
output.
+ the CKC is a positive-triggered.
b. D-FF (7474)
SW0
D Q Q+
0 0 0
1 0 1
0 1 0
1 1 1
U19A
4
2 PRE 5
CKLED DISPLAY D Q
Pulse SW 3
CLK
CLR
6 LED DISPLAY
Q
74LS1
74
SW1
INPUTS OUTPUTS
PR CLR CLK D Q Q
0 1 X X 1 0
1 0 X X 0 1
0 0 X X X X
1 1 ↑ 0 1 0
1 1 ↑ 1 0 1
- PRE: On the JK Flip-Flop, this was utilized to immediately insert a "1" in the Q
output.
- CLR: On the JK Flip-Flop, this was utilized to immediately insert a "1" in the Q
output.
D Q Q+
0 0 0
1 0 1
0 1 0
1 1 1
Implement the circuit via simulation software and paste the result in here
An asynchronous counter works by having the clock input of each flip-flop driven by
the output of the preceding flip-flop, causing a ripple effect as the state change
propagates through the flip-flops.
In contrast, a synchronous counter has all flip-flops' clock inputs connected to the
same clock source, ensuring simultaneous state changes, and avoiding the ripple
effect. This leads to faster and more predictable operation in synchronous counters.
▪ Implement the above circuit shown in figure 8 (using IC74LS112 and 74LS86).
The PR (SW1) and CL (SW2) inputs are in the appropriate states to make the
circuit operate:
PR : This input should be set to HIGH (5V) to ensure the flip-flops are not
asynchronously preset.
CL: This input should be set to HIGH (5V) to ensure the flip-flops are not
asynchronously cleared.
When C = 1;
The circuit will function as a down-counter. The JK Flip-Flops will count downwards
with each clock pulse.
The output LEDs will indicate the binary count from 111 to 000 (7 to 0).
Conclusions
By setting the control input (C) to 0, the circuit counts upwards, incrementing the
binary value with each clock pulse.
By setting the control input (C) to 1, the circuit counts downwards, decrementing the
binary value with each clock pulse.
This demonstrates the versatility of the asynchronous counter in handling both up-
counting and down-counting modes based on the control signal.
Figure 9
Implement the circuit shown in figure 9. The K inputs of FF 0 and FF2 areconnected
to High level. The PR (SW1) and CL (SW2) inputs are in the appropriate states to
make the circuit operate.
J0 =Q'2; K0 = 0
J1 = Q0; K1 = Q0
J2 = Q0 Q1; K2 = 0
Present State Next State
Q2 Q1 Q0 J2 K2 J1 K1 J0 K0 Q2 Q1 Q0
0 0 0 0 0 0 0 1 0 0 0 1
0 0 1 0 0 1 1 1 0 0 1 1
0 1 0 0 0 0 0 1 0 0 1 1
0 1 1 1 0 1 1 1 0 1 0 1
1 0 0 0 0 0 0 0 0 1 0 0
1 0 1 0 0 1 1 0 0 1 1 1
1 1 0 0 0 0 0 0 0 1 1 0
1 1 1 1 0 1 1 0 0 1 0 1
Figure 10
CLK
1
J0 0
K0 0
Q0 0
J1 0
K1 0
Q1 0
J2 0
K2 0
Q2 0
State 000
Q0Q1Q2
Figure 11 - Waveforms of the outputs Q0 Q1 Q2
00 10
01 11
J1 =1; K1 =Q'0
Discussion of Results
- Discover the differences between J-K Flip Flops and D Flip Flops, as well as how to
convert J-K Flip Flops to D Flip Flops.
- Learn how to use J-K Flip Flops to construct simple counting circuits.