You are on page 1of 32

Digital Circuits(15EECC203)

Analysis of Sequential
NOTE: Explanation Refer Class Notes

Circuits
by
Nagaraj Vannal,
Asst.Professor, School of Electronics
Engineering,
K.L.E. Technological University, Hubballi.
nagaraj_vannal@bvb.edu

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Analysis of Sequential Circuit


(Planned Hours:10hours)
Lesson Schedule:
1. Registers
2. Registers
3. Counters
4. Binary Ripple Counters
5. Synchronous Binary counters
6. Ring and Johnson Counters
7. Design of a Synchronous counters
8. Design of a Synchronous Mod-n Counter using clocked JK
9. Design of a Synchronous Mod-n Counter using clocked D Flip-Flops
10. Design of a Synchronous Mod-n Counter using clocked T and SR Flip-
Flops.
Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

The Registers
• Register – a collection of binary storage elements
• In theory, a register is sequential logic which can
be defined by a state table
• More often, think of a register as storing a vector
of binary values
• Frequently used to perform simple data storage
and data movement and processing operations

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Shift Registers
A Shift Register is a sequential logic device made up of flip-flops that allows
parallel or serial loading and serial or parallel outputs as well as shifting bit by bit.

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

SHIFT REGISTER VOCABULARY


REGISTER- group of flip flops capable of storing data.

SERIAL DATA TRANSMISSION- transfer of data from one place to another


one bit at a time.

PARALLEL DATA TRANSMISSION- simultaneous transfer of all bits of a


data word from one place to another.

SISO- SERIAL IN/SERIAL OUT- type of register that can be loaded with data
serially and has only one serial output.

SIPO- SERIAL IN/PARALLEL OUT- type of register that can be loaded with
data serially and has parallel outputs available.

PISO- PARALLEL IN/SERIAL OUT- type of register that can be loaded with
parallel data and has only one serial output.

PIPO- PARALLEL IN/PARALLEL OUT- type of register that can be loaded with
parallel data and has parallel outputs available.

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Serial in Serial out (SISO)


Q3 Q2 Q1 Q0
Serial Input
D Q D Q D Q D Q Serial Output

CLK

CLK
SI
Q3
Q2
Q1
Q0
Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Serial In Parallel Out(SIPO)

 Accepts data serially.


 Outputs of all stages are available simultaneously.

Data input D Q D Q D Q D Q

C C C C

CLK

Q0 Q1 Q2 Q3

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Parallel In Parallel Out (PIPO)

 Simultaneous input and output of all data bits.

Parallel data inputs

D0 D1 D2 D3

D Q D Q D Q D Q
C C C C

CLK

Q0 Q1 Q2 Q3

Parallel data outputs

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Parallel In Serial Out (PISO)

 Bits are entered simultaneously, but output is serial.


Data input

D0 D1 D2 D3
SHIFT/LOAD

Serial
D Q D Q D Q D Q data
Q0 Q1 Q2 Q3 out
C C C C

CLK
SHIFT.Q0 + SHIFT'.D1

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Bidirectional Shift Registers

 Data can be shifted either left or right, using a control line


RIGHT/LEFT (or simply RIGHT) to indicate the direction.
RIGHT/LEFT

Serial
data in

D Q D Q Q1 D Q Q2 D Q Q3
C C C C

Q0
CLK
RIGHT.Q0 +
RIGHT'.Q2

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Universal Shift Register


Mode Select
Register Operation
S1 S0
 4-bit bidirectional shift register with 0 0 Hold
parallel load. 0 1 Shift right
1 0 Shift left
1 1 Parallel load

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Shift Register Counters


Shift register counter: a shift register with the
serial output connected back to the serial input.
They are classified as counters because they give
a specified sequence of states.
Two common types: the Johnson counter and the
Ring counter.

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Ring Counters
One flip-flop (stage) for each state in the
sequence.
The output of the last stage is connected to the D
input of the first stage.
An n-bit ring counter cycles through n states.
No decoding gates are required, as there is an
output that corresponds to every state the counter
is in.
Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Ring Counters
Example: A 6-bit ring counter.
PRE
Q0 Q1 Q2 Q3 Q4 Q5
D Q D Q D Q D Q D Q D Q

CLR
CLK

100000
Clock Q0 Q1 Q2 Q3 Q4 Q5
000001 010000
0 1 0 0 0 0 0
1 0 1 0 0 0 0
2 0 0 1 0 0 0 000010 001000
3 0 0 0 1 0 0
4 0 0 0 0 1 0 000100
5 0 0 0 0 0 1

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Johnson Counters
The complement of the output of the last stage is
connected back to the D input of the first stage.
Also called the twisted-ring counter.
Require fewer flip-flops than ring counters but more flip-
flops than binary counters.
An n-bit Johnson counter cycles through 2n states.
Require more decoding circuitry than ring counter but
less than binary counters.

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Johnson Counters
Example: A 4-bit Johnson counter.
Q0 Q1 Q2
D Q D Q D Q D Q
Q'
Q3'
CLR
CLK

Clock Q0 Q1 Q2 Q3 0000
0 0 0 0 0
0001 1000
1 1 0 0 0
2 1 1 0 0
3 1 1 1 0 0011 1100
4 1 1 1 1
5 0 1 1 1 0111 1110
6 0 0 1 1
7 0 0 0 1 1111

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Introduction: Counters

Counters are circuits that cycle through a


specified number of states.
Two types of counters:
synchronous (parallel) counters
asynchronous (ripple) counters

Ripple counters allow some flip-flop outputs to


be used as a source of clock for other flip-flops.
Synchronous counters apply the same clock to
all flip-flops.
Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Asynchronous (Ripple) Counters

 Asynchronous counters: the flip-flops do not change


states at exactly the same time as they do not have a
common clock pulse.
 Also known as ripple counters, as the input clock
pulse “ripples” through the counter – cumulative
delay is a drawback.
 n flip-flops  a MOD (modulus) 2n counter. (Note: A
MOD-x counter cycles through x states.)
 Output of the last flip-flop (MSB) divides the input
clock frequency by the MOD number of the counter,
hence a counter is also a frequency divider.
Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Asynchronous (Ripple)
Counters
 Example: 4-bit ripple binary counter
(negative-edge triggered).
HIGH
Q0 Q1 Q2 Q3
J J J J
CLK C C C C
K K K K
FF0 FF1 FF2 FF3

CLK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Q0

Q1

Q2

Q3

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Asyn. Counters with MOD no. < 2n


 States may be skipped resulting in a truncated
sequence.
 Technique: force counter to recycle before going
through all of the states in the binary sequence.
 Example: Given the following circuit, determine
the counting sequence (and hence the modulus
no.)
C B A
Q J Q J Q J
All J, K CLK CLK CLK
inputs Q K Q K Q K
CLR CLR CLR
are 1
(HIGH). B
C

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Asyn. Counters with MOD no. < 2n


 Example (cont’d):
C B A
Q J Q J Q J
All J, K CLK CLK CLK
inputs Q K Q K Q K
CLR CLR CLR
are 1
(HIGH). B
C

1 2 3 4 5 6 7 8 9 10 11 12
Clock MOD-6 counter
A produced by
clearing (a MOD-8
B
binary counter)
C when count of six
NAND 1 (110) occurs.
Output 0

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Asyn. Counters with MOD no. < 2n


 Example (cont’d): Counting sequence of
circuit (in CBA order).
1 2 3 4 5 6 7 8 9 10 11 12
Clock 0 1 0 1 0 1 0 1
A 0 0 1 1 0 0 0 0
0 0 0 0 1 1 0 0
B
C
NAND 1
Output 0

111 000
Temporary 001
state
Counter is a MOD-6
110 010 counter.

101 011
100

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Asyn. Counters with MOD no. < 2n

 Decade counters (or BCD counters) are counters


with 10 states (modulus-10) in their sequence.
They are commonly used in daily life (e.g.:
utility meters, odometers, etc.).
 Design an asynchronous decade counter.
(A.C)'

HIGH
D C B A
J Q J Q J Q J Q

CLK C C C C
K K K K
CLR CLR CLR CLR

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Asyn. Counters with MOD no. < 2n


 Asynchronous decade/BCD counter (cont’d).
HIGH D C B A
J Q J Q J Q J Q (A.C)'
CLK C C C C
K K K K
CLR CLR CLR CLR

1 2 3 4 5 6 7 8 9 10 11
Clock 0 1 0 1 0 1 0 1 0 1 0
D 0 0 1 1 0 0 1 1 0 0 0

C 0 0 0 0 1 1 1 1 0 0 0

B 0 0 0 0 0 0 0 0 1 1 0

A
NAND
output
Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Asynchronous Down Counters


 So far we are dealing with up counters. Down
counters, on the other hand, count downward
from a maximum value to zero, and repeat.
 Example: A 3-bit binary (MOD-2 ) down counter. 3

1
Q0 Q1 Q2
J Q J Q J Q 3-bit binary
CLK C C C up counter
Q' K Q' K Q'
K

1
Q0 Q1 Q2
J Q J Q J Q 3-bit binary
CLK C C C down counter
Q' K Q' K Q'
K

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Asynchronous Down Counters

 Example: A 3-bit binary (MOD-8) down


counter. 001
000
111
1
Q0 Q1 Q2
J Q J Q J Q 010 110
CLK C C C
Q' K Q' K Q'
K
011 101
100

CLK 1 2 3 4 5 6 7 8

Q0 0 1 0 1 0 1 0 1 0

Q1 0 1 1 0 0 1 1 0 0

Q2 0 1 1 1 1 0 0 0 0

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Asynchronous (Ripple) Counters

 Propagation delays in an asynchronous


(ripple-clocked) binary counter.
 If the accumulated delay is greater than the
clock pulse, some counter states may be
misrepresented!
CLK 1 2 3 4

Q0

Q1

Q2
tPHL (CLK to Q0) tPHL (CLK to Q0)
tPLH (Q0 to Q1) tPHL (Q0 to Q1)
tPLH
(CLK to Q0) tPLH (Q1 to Q2)

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Design of a Synchronous Mod-n Counter


using clocked JK Flip-Flops

REFER THE CLASS NOTES

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Design of a Synchronous Mod-n Counter


using clocked T Flip-Flops

REFER THE CLASS NOTES

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Design of a Synchronous Mod-n Counter


using clocked D Flip-Flops

REFER THE CLASS NOTES

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Design of a Synchronous Mod-n Counter


using clocked SR Flip-Flops

REFER THE CLASS NOTES

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi
Digital Circuits(15EECC203)

Design of a Synchronous Counter using


clocked SR Flip-Flops
Sequence = 0 – 1 – 3 – 4 – 2 – 0
REFER THE CLASS NOTES

Nagaraj Vannal, Faculty, School of Electronics Engineering, KLE Tech University, Hubballi

You might also like