Flip-flops
Chapter4
Simple counter
Counting is a fundamental function
of digital circuits.
A digital counter consists of a
collection of flip-flops that
change states (set or reset) in a
prescribed sequence,
Asynchronous counter
The output of one flip-flop provides
the clock for the next flip-flops.
When all of the flip-flop outputs are
available,these are called modulo-n
counters where n represent the
terminal counter.
Divide by 2,4 and 8 Counters
K
J
Q1’
Q1
CCLK
K
J
Q2’
Q2
C
11
VCC
CLK
Q1
Q2
0
0
1
0
0
1
1
1
0
0
1
0
Johnson Counter (synchronous)
The output of one flip-flop directly
connects to the input of another.
D
Q1’
Q1
C
D
Q2’
Q2
C
D
Q3’
Q3
C
D
Q4’
Q4
C
CLK
1
1
0
0
D
Q1’
Q1
C
D
Q2’
Q2
C
D
Q3’
Q3
C
D
Q4’
Q4
C
CLK
CLK
Q1
Q3
Q4
Q2
t
t’1 2 3 4 5 6 7 8 9
Time t,CLK=1,Q1=1,Q2=1,Q3=0,Q4=0
Time t’,CLK=0,Q1=Q4’t=1,Q2=Q1t=1,Q3=Q2t=1,Q4=Q3t=0
1
1
1
0
Johnson Counter (synchronous)
The Johnson counter can produce a series of
outputs from each flip-flop that is offset by
a clock pulse from the preceding flip-flop
output.
The Johnson counter can be used to produce
time delay; the output of each flip-flop is
delayed by one clock pulse from the previous
output.
Ring Counter (synchronous)
The output of one flip-flop directly
connects to the input of another.
The ability to load the flip-flops to a
particular state permits a repeatable
output pattern,
The counter is initialized to the
appropriate data pattern,using the
flip-flops’ asynchronous inputs.
Ring Counter (synchronous)
Each flip-flop has separate preset and
clear inputs,
Feeding back the most significant output to
the least significant input,Data are
shifted from one flip-flop to the next on
each negative/positive edge of the clock
pulse.
The preloaded pattern repeats every n
clock pulse,n is the length of data pattern.
D
Q1’
Q1
C
D
Q2’
Q2
C
D
Q3’
Q3
C
D
Q4’
Q4
C
CLK
CLK
Q1
Q3
Q4
Q2
t
t’
Time t,CLK=1,Q4=0,Q3=0,Q2=1,Q1=1;
Time t’,CLK=0,Q4=Q3t=0,Q3=Q2t=1,Q2=Q1t=1,Q1=Q4t=0
0
1
1
0
1
1
0
0
0
0
1
1
1
0
0
1
1
1
0
0
1 2 3 4
Chapter4
Simple counter
Counting is a fundamental function
of digital circuits.
A digital counter consists of a
collection of flip-flops that
change states (set or reset) in a
prescribed sequence,
Asynchronous counter
The output of one flip-flop provides
the clock for the next flip-flops.
When all of the flip-flop outputs are
available,these are called modulo-n
counters where n represent the
terminal counter.
Divide by 2,4 and 8 Counters
K
J
Q1’
Q1
CCLK
K
J
Q2’
Q2
C
11
VCC
CLK
Q1
Q2
0
0
1
0
0
1
1
1
0
0
1
0
Johnson Counter (synchronous)
The output of one flip-flop directly
connects to the input of another.
D
Q1’
Q1
C
D
Q2’
Q2
C
D
Q3’
Q3
C
D
Q4’
Q4
C
CLK
1
1
0
0
D
Q1’
Q1
C
D
Q2’
Q2
C
D
Q3’
Q3
C
D
Q4’
Q4
C
CLK
CLK
Q1
Q3
Q4
Q2
t
t’1 2 3 4 5 6 7 8 9
Time t,CLK=1,Q1=1,Q2=1,Q3=0,Q4=0
Time t’,CLK=0,Q1=Q4’t=1,Q2=Q1t=1,Q3=Q2t=1,Q4=Q3t=0
1
1
1
0
Johnson Counter (synchronous)
The Johnson counter can produce a series of
outputs from each flip-flop that is offset by
a clock pulse from the preceding flip-flop
output.
The Johnson counter can be used to produce
time delay; the output of each flip-flop is
delayed by one clock pulse from the previous
output.
Ring Counter (synchronous)
The output of one flip-flop directly
connects to the input of another.
The ability to load the flip-flops to a
particular state permits a repeatable
output pattern,
The counter is initialized to the
appropriate data pattern,using the
flip-flops’ asynchronous inputs.
Ring Counter (synchronous)
Each flip-flop has separate preset and
clear inputs,
Feeding back the most significant output to
the least significant input,Data are
shifted from one flip-flop to the next on
each negative/positive edge of the clock
pulse.
The preloaded pattern repeats every n
clock pulse,n is the length of data pattern.
D
Q1’
Q1
C
D
Q2’
Q2
C
D
Q3’
Q3
C
D
Q4’
Q4
C
CLK
CLK
Q1
Q3
Q4
Q2
t
t’
Time t,CLK=1,Q4=0,Q3=0,Q2=1,Q1=1;
Time t’,CLK=0,Q4=Q3t=0,Q3=Q2t=1,Q2=Q1t=1,Q1=Q4t=0
0
1
1
0
1
1
0
0
0
0
1
1
1
0
0
1
1
1
0
0
1 2 3 4