Lab 2 - Flip Flops and Counters
Lab 2 - Flip Flops and Counters
Lab 2 - Flip Flops and Counters
Lab 2
Date: ....................................................................
Student’s Name: ..................................................
ID: .......................................................................
HCMC UNIVERSITY OF TECHNOLOGY AND EDUCATION
FACULTY FOR HIGH QUALITY TRAINING
INDUSTRIAL ELECTRONICS - BIOMEDICAL ENGINEERING DEPARTMENT
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. Analyze and implement a synchronous counter
b. Design and implement a synchronous 2-bit counter M = 3
IV/ PRE-LAB
The student must complete the questions in this section and read the book before
going to the class.
- 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.
Lab 2 - FLIP FLOPS AND COUNTERS.doc
Page | 2
HCMC UNIVERSITY OF TECHNOLOGY AND EDUCATION
FACULTY FOR HIGH QUALITY TRAINING
INDUSTRIAL ELECTRONICS - BIOMEDICAL ENGINEERING DEPARTMENT
V/ EXPERIMENT
1. R’S’ FLIP FLOPS
a. R’S’-FF using NAND gate
0 0 1 1
0 1 1 0
1 0 0 1
1 1 0;1 1;0
Toggle switch of SW1 and SW2 to change input logic level and write down
the result to table 2.2
Table 2.2: The truth-table of the FF RS using NOR gate
0 0 0;1 1;0
0 1 1 0
1 0 0 1
1 1 0 0
Figure 2.3. The pin connections and IEC logic symbol of Flip Flop 74LS112
The function table of the JK Flip Flop is shown as table 2.3.
Table 2.3: The truth-table (function table) of the 74LS112
The pin descriptions of the JK Flip Flop are shown as table 2.4.
Table 2.4: The pin descriptions of the 74LS112
Figure 2.4. The schematics and output name of Flip Flop 74LS112
Lab 2 - FLIP FLOPS AND COUNTERS.doc
Page | 6
HCMC UNIVERSITY OF TECHNOLOGY AND EDUCATION
FACULTY FOR HIGH QUALITY TRAINING
INDUSTRIAL ELECTRONICS - BIOMEDICAL ENGINEERING DEPARTMENT
The name of two ICs is IC8 and IC9 which the power supply is connected.
The PRE input and CLR input are connected to power through a 4,7 kΩ
resistor. It means that, when we don’t use, the PRE input and CLR input are
high.
Because of the time response of the FFs is different, the output Q of four FF
is wired to four 1nF capacitor for delay when we implement the feedback
function of the counter circuit mod M.
The schematic and location of two ICs on DLS kit is shown in figure 2.5.
Figure 2.5. The Flip Flop 74LS112 on DLS kit and name of input and output
c. Checking the Flip Flop
Implement the circuit shown in figure 2.6
Figure 2.6. The schematics for checking the Flip Flop 74LS112.
Toggle switch of SW0, SW1, SW2 and SW3 to change input logic level
following the truth-table and observe the output state (LED 0 and LED 1).
Compare the output state of FF with the truth-table in datasheet. If the output
is the same, the FF is good.
Tick “×” if the logic gate is damage, tick “√” if the logic gate is good.
Table 2.5: Determine the status of 74LS112
ICs No. IC8A IC8B IC9A IC9B
Good/Damage (“√/×”)
0 0 0 0
1 0 0 1
2 0
1 2
3 1
1 3
4 0 0 0
3 0 1
1
4 0 0 0
1 0 0 1
0
2 0 0 1 0
3 0 0 1
1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1
1
12 1 1 0 0
13 0 1
1 1
14 1 1 1 0
15 1 1 1 1
16 0 0 0 0
5 1 0 1 1
6 1 0 1 0
7 1 0 0 1
8 1 0 0 0
9 0 1 1 1
10 0 1 1 0
11 0 1 0 1
12 0 0 0
1
13 0 1 1
0
14 0 0 1 0
15 0 0 0 1
16 0 0 0 0
Press the “RSTL” button and observe the clock CP1 and the output signal in
four led.
Write down the output signal in four led into the table 2.10
Table 2.10: The output status of up counter having mod M = 10
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 0 0 0 0
2 1 1 0 1
3 0 0
1 1
4 1 0 1 1
5 1 0 1 0
6 1 0 0 1
7 1 0 0 0
8 1 1
0 1
9 0 1 1 0
10 0 1 0 1
11 1 1 1 1
12 1 1 1 0
13 1 1 0 1
14 1 1 0 0
15 1 0 1 1
16 1 0 1 0
0 0 0 0
1 0 1 1
2 0 2
1
3 1 1 3
4 0 0
0
Figure 2.14. The two bit synchronous down counter using 74LS112
0 0 0 0
1 1 3
1
2 1
0 2
3 0 1 1
4 0 0 0
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 1 1 1
0
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1
16 0 0 0 0
2 1 1 1 0
3 1 1 0 1
4 1 1 0 0
5 1 0 1 1
6 1 0 1 0
7 1 0 0 1
8 1 0 0 0
9 0 1 1 1
10 0 1 1 0
11 0 1 0 1
12 0 1 0 0
13 0 0 1 1
14 0 0 0
1
15 0 0 0 1
16 0 0 0 0
Figure 2.17. The pin connections and IEC logic symbol of Flip Flop 74LS74
The function table of the JK Flip Flop is shown as table 2.3.
Table 2.16: The truth-table (function table) of the 74LS74
Figure 2.18. The schematics and output name of Flip Flop 74LS74
The name of two ICs is IC8 and IC9 which the power supply is connected.
The PRE input and CLR input are connected to power through a 4,7 kΩ
resistor. It means that, when we don’t use, the PRE input and CLR input are
high.
The schematic and location of two ICs on DLS kit is shown in figure 2.19.
Figure 2.19. The Flip Flop 74LS74 on DLS kit and name of input and output
Figure 2.20. The schematics for checking the Flip Flop 74LS74.
Toggle switch of SW0, SW1, SW2 and SW3 to change input logic level
following the truth-table and observe the output state (LED 0 and LED 1).
Compare the output state of FF with the truth-table in datasheet. If the output
is the same, the FF is good.
Tick “×” if the logic gate is damage, tick “√” if the logic gate is good.
Table 2.17: Determine the status of 74LS112
Good/Damage (“√/×”)
Toggle switch of SW1 = ‘1’ (the input D corresponding the logic high,
LED8 is on), press the “RSTL” button and observe clock CP1 and LED0,
LED1, LED2, LED3 until all LED is on.
Write down the result into the table 2.18.
Toggle switch of SW1 = ‘0’ (the input D corresponding the logic low, LED8
is on), observe clock CP1 and LED0, to LED3 until all LED is off.
Write down the result to the table 2.19.
Table 2.19: The 4-bit shift register – input is high
Input Output
CP 1 D Led3 Led 2 Led 1 Led 0
0 0 1 1 1
1
0 1 1 1 0
1
0 1 0
2 1 0
3 0 1 0 0 0
4 0 0 0 0 0
5 0 0 0
0 0
0 0
6 0 0 0
0 0 0
7 0 0
Press the “RSTL” button and observe clock and output signal.
Write down the result to the table 2.21.
0 1 0 0 0 0
0
1 1 0 0 1
1 0 0 1 1
2
1 0 1 1 1
3
0 1 1 1 1
4
0 1 1 1 0
5
1 1 0
6 0 0
0 1 0 0 0
7
Press the “RSTL” button and observe clock and output signal.
0 0 0 0 0 1
1 0 0 0 1 0
2 0 0 1 0 0
3 1 1 0 0 0
4 0 0 0 1
0
5 0 0 0 1 0
6 0 0 1 0 0
7 1 1 0 0 0
Toggle switch of SW1 = ‘1’ and SW1 = ‘0’, observe the clock CP1 and
LED0.
Write down the result to the table 2.22.
Table 2.22: The truth table of T-FF
Inputs Output
↑ 0 0
↑ 1 0
From the block diagram shown in figure 2.25, design the circuit to convert
JK-FF to D-FF:
The way to convert
Implement the circuit to verify the operation of the new FF (fulfill the true
table in Table 2.23).
Draw the circuit appropriately in figure 2.26.
Inputs Output
CP1 Led1 – Q1 Led0 – Q0
↑ 0 0
↑ 0 1
↑ 1 0
↑ 1 1
Observe the signal on LED1 (Q) and LED2 when the button MONO1
was pressed at the first times, second times, third times.
This circuit can use to enable/disable the clock CP1 by AND gate. The
blink frequency of LED3 equal to the clock CP1.
When the output is Q = 1, the LED1 is ON and the clock CP1 is pass
through AND gate. The LED2 blink the same with LED3.
When the output is Q = 0, the LED1 is OFF and the clock CP1 is
disabled by AND gate. The LED2 is OFF.
By using the MONO clock, we can enable/disable the clock CP1 by
AND gate.
This circuit can use to control the start and pause the counter circuit.