Along with combinational logic, sequential logic is a fundamental building block of digital electronics. The output values of sequential logic depend not only on the current input values (i.e., combinational logic), but also on previous output values.
Thus, sequential logic requires a clock signal to control sequencing and memory and to retain previous outputs.
In this activity we will use the D flip-flop. We are limiting our use to this type of flipflop in this introductory unit because of its simplicity and ease of use. The D flip-flop is just one of many different types of flip-flops that can be used to implement sequential logic circuits.
Paper and pencil
Circuit Design Software (CDS)
Let’s begin the study of sequential logic by investigating the basic operations of the
D flip-flop.
1. Using the Circuit Design Software (CDS), enter the D flip-flop test circuit shown below. Use a switch for the input T and probes for the outputs Que and NOT_Que .
Note: The PR (preset) and CLR (clear) inputs on the 74LS74 are active low inputs. In this circuit PR and CLR are connected to 5v (high), which makes them both inactive.
Project Lead The Way, Inc.
Copyright 2010
DE – Unit 1 – Lesson 1.3 – Activity 1.3.2 – Sequential Logic: An Overview – Page 1
a) Toggle the input T several times and record what effect this has on the two outputs.
It switches diodes b) What happens when the switch is moved from GROUND to 5v? What happens when the switch is moved from 5v to GROUND? Explain.
Power shuts off then turns back on
2. Using the Circuit Design Software (CDS), modify the circuit used in step (1) so that it matches the example shown below. a) Start the simulation. b) Set the input switches P and R to 5v. Again, since PR and CLR are active low inputs, this will make them both inactive. Toggle the input T several times. The circuit should behave exactly like the circuit in step (1). c) Set the input switch P to GROUND and R to 5v. What is the state of the two outputs?
Que is lit d) Toggle the input T several times and record what effect this has on the two outputs.
Project Lead The Way, Inc.
Copyright 2010
DE – Unit 1 – Lesson 1.3 – Activity 1.3.2 – Sequential Logic: An Overview – Page 2
No effect e) Set the input switch P to 5v and R to GROUND. What is the state of the two outputs?
Not Que is lit f) Toggle the input T several times and record what effect this has on the two outputs.
No effect
Let us examine a simple binary counter. Counters are one of the most common applications of flip-flops. The circuit that we will be observing is called a two-bit binary counter. The counter will count from zero (00 in binary) to three (11 in binary).
1. Using the Circuit Design Software (CDS), enter the two-bit binary counter shown below. Use a switch for the input Clock-In and probes for the outputs
A and B . a) Start the simulation. b) Cycle the input Clock-In (switch T ) several times and record what effect this has on the two outputs in the table below.
Clock-In
Initial Values
1 st Toggle
2 nd Toggle
3 rd Toggle
4 th Toggle
5 th Toggle
6 th Toggle
A
0
1
0
1
0
1
0
B
1
1
0
0
1
1
0
Project Lead The Way, Inc.
Copyright 2010
DE – Unit 1 – Lesson 1.3 – Activity 1.3.2 – Sequential Logic: An Overview – Page 3
c) Based on these results, explain the pattern that you observe in the two outputs.
It starts with B, fill and empties then starts A fills and empties
2. Using the Circuit Design Software (CDS), modify the circuit used in step (1) so that it matches that shown below.
The first modification is to replace the switch input with a CLOCK_VOLTAGE .
This change will result in the input being continuously toggled. Be sure the
CLOCK_VOLTAGE is set to 5 volts, 50% duty cycle, 1 kHz.
The second modification is to add a four-channel oscilloscope set up to view the four signals A , B , Clock-In , and ~1Q (i.e., the Q-not output of the first flipflop). Be sure to set the oscilloscope’s time-base to 1ms/div and the verticalbases of the four channels to 10volts/div. Also, adjust the Y position of the four channels such that the four signals are all clearly visible.
Project Lead The Way, Inc.
Copyright 2010
DE – Unit 1 – Lesson 1.3 – Activity 1.3.2 – Sequential Logic: An Overview – Page 4
a) Start the simulation and let it run until you have captured several periods of each signal. b)
Using the oscilloscope’s markers, measure the period of the three signals.
Use this data to calculate the frequency for each signal. Record your data in the table below. Be sure to use the correct units.
Signal
Clock-
In
A
B
Period
1mS
2mS
4mS
Frequency
1mHz
500uHz
250uHz
Project Lead The Way, Inc.
Copyright 2010
DE – Unit 1 – Lesson 1.3 – Activity 1.3.2 – Sequential Logic: An Overview – Page 5
c) Based on these results, explain the relationship of the period and frequency between the three signals. Was this expected?
1. List 3-5 real-world applications where you might find counters like the one examined in this activity.
Stop lights, cross walk signs, emergency lights
2. Simple counters are just one application of sequential logic. From your life experiences, list 3-5 examples of products that you have used that contain sequential logic.
Strobe light,
Project Lead The Way, Inc.
Copyright 2010
DE – Unit 1 – Lesson 1.3 – Activity 1.3.2 – Sequential Logic: An Overview – Page 6
Analyze the 4-bit binary counter shown below to determine the frequency and period for the signals A, B, C, and D. Use the table shown below to record your answers.
Signal
Clock-
In
A
B
C
D
Period
1mS
2mS
4mS
8mS
16mS
Frequency
1mHz
500uHz
250uHz
125uHz
.05125uHz
Project Lead The Way, Inc.
Copyright 2010
DE – Unit 1 – Lesson 1.3 – Activity 1.3.2 – Sequential Logic: An Overview – Page 7