cpm113 06-design of counters
TRANSCRIPT
-
7/30/2019 Cpm113 06-Design of Counters
1/23
ADVANCED LOGIC
CIRCUITS AND SWITCHING
THEORY (CPM113)
DESIGN OF COUNTERS
-
7/30/2019 Cpm113 06-Design of Counters
2/23
DESIGN OF COUNTERS
Counters
A sequential circuit that goes through a
prescribed sequence of states upon the
application of input pulses is called a counter.
The input pulses, called count pulses, may be
clock pulses.
-
7/30/2019 Cpm113 06-Design of Counters
3/23
DESIGN OF COUNTERS
In a counter, the sequence of states may follow
a binary count or any other sequence of states.
Counters are found in almost all equipment
containing digital logic. They are used for
counting the number of occurrences of an
event and are useful for generating timing
sequences to control operations in a digital
system.
-
7/30/2019 Cpm113 06-Design of Counters
4/23
DESIGN OF COUNTERS
Of the various sequences a counter may follow,
the straight binary sequence is the simplestand most straight forward. A counter that
follows the binary sequence is called a binary
counter. An n-bit binary counter consists of n
flip-flops and can count in binary from 0 to 2n -
1.
-
7/30/2019 Cpm113 06-Design of Counters
5/23
DESIGN OF COUNTERS
Design a 3-bit binary counter whose state
diagram is given.
-
7/30/2019 Cpm113 06-Design of Counters
6/23
DESIGN OF COUNTERS
-
7/30/2019 Cpm113 06-Design of Counters
7/23
DESIGN OF COUNTERS
Step 2. Derive the transition table.Use the equation below to determine the
number of flipflops to be used in the design of
the circuit.
-
7/30/2019 Cpm113 06-Design of Counters
8/23
DESIGN OF COUNTERS
Since there are eight states, the number of
flipflops required would be three.Now we want to implement the counter design
using JK flipflops. Next step is to develop an
excitation table from the state table.
-
7/30/2019 Cpm113 06-Design of Counters
9/23
DESIGN OF COUNTERS
-
7/30/2019 Cpm113 06-Design of Counters
10/23
DESIGN OF COUNTERS
Step 3. Derive the simplified Boolean
expression for each flipflop input using
Karnaugh map.
-
7/30/2019 Cpm113 06-Design of Counters
11/23
DESIGN OF COUNTERS
-
7/30/2019 Cpm113 06-Design of Counters
12/23
DESIGN OF COUNTERS
The 1s in the Karnaugh maps are grouped with
"don't cares" and the following expressions forthe J and K inputs of each flip-flop are
obtained:
-
7/30/2019 Cpm113 06-Design of Counters
13/23
DESIGN OF COUNTERS
Step 4. Construct the sequential circuit.
Implement the combinational logic from the
equations and connect the flip-flops to formthe sequential circuit.
The complete logic of a 3-bit binary counter is
shown below.
-
7/30/2019 Cpm113 06-Design of Counters
14/23
DESIGN OF COUNTERS
Up/down Counter
An up/down counter is one that is capable of
progressing in either direction through acertain sequence.
It can have any specified sequence of states.
It is sometimes called a bidirectional counter.
-
7/30/2019 Cpm113 06-Design of Counters
15/23
DESIGN OF COUNTERS
Illustrative ExampleDesign the 3-bit Gray code counter using JK
flip-flops.
Step 1. State Diagram
State Diagram for a 3-bit Gray code counter:
-
7/30/2019 Cpm113 06-Design of Counters
16/23
DESIGN OF COUNTERS
Step 2. Next-State Table
Next state table for a 3-bit Gray code counter:
-
7/30/2019 Cpm113 06-Design of Counters
17/23
DESIGN OF COUNTERS
-
7/30/2019 Cpm113 06-Design of Counters
18/23
DESIGN OF COUNTERS
Step 4. Karnaugh MapsKarnaugh maps for present-state J and K inputs
for the 3- bit Gray code counter.
-
7/30/2019 Cpm113 06-Design of Counters
19/23
DESIGN OF COUNTERS
-
7/30/2019 Cpm113 06-Design of Counters
20/23
DESIGN OF COUNTERS
Step 5. Logic Expressions for Flip-flop InputsThe next-state J and K outputs for a 3-bit Gray
code counter.
-
7/30/2019 Cpm113 06-Design of Counters
21/23
DESIGN OF COUNTERS
Step 6: Counter ImplementationThe hardware diagram of the 3-bit Gray code
counter
-
7/30/2019 Cpm113 06-Design of Counters
22/23
DESIGN OF COUNTERS
Exercises:
1. Design a mod-5 counter which has the
following binary sequence: 0, 1, 2, 3, 4. Use JK
flip-flops.
2. Design a counter that has the following
repeated binary sequence: 0, 1, 2, 3, 4, 5, 6, 7.
Use RS flip-flops.
-
7/30/2019 Cpm113 06-Design of Counters
23/23
DESIGN OF COUNTERS
3. Design a counter with the following binary
sequence: 1, 2, 5, 7 and repeat. Use JK flip-
flops.
4. Design a counter with the followingrepeated binary sequence: 0, 4, 2, 1, 6. Use T
flip-flops.
5. Design a counter that counts in the
sequence 0, 1, 3, 6, 10, 15, using four a) D, b)
SR, c) JK and d) T flip-flops.