0% found this document useful (0 votes)
52 views72 pages

Coeng3059:: Digital Logic Design

Counters and its Design - Counters are widely used logic components that can count clock cycles, divide clock signals, and increment memory addresses. - Counters can be asynchronous (ripple) or synchronous (parallel). Asynchronous counters have flip-flops clocked in series, while synchronous counters clock all flip-flops together. - A 3-bit asynchronous up-counter uses 3 flip-flops to count from 000 to 111 in a ripple effect. It has a modulus of 8, repeating its count every 8 clock cycles.

Uploaded by

ALEMU DEMIRACHEW
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views72 pages

Coeng3059:: Digital Logic Design

Counters and its Design - Counters are widely used logic components that can count clock cycles, divide clock signals, and increment memory addresses. - Counters can be asynchronous (ripple) or synchronous (parallel). Asynchronous counters have flip-flops clocked in series, while synchronous counters clock all flip-flops together. - A 3-bit asynchronous up-counter uses 3 flip-flops to count from 000 to 111 in a ripple effect. It has a modulus of 8, repeating its count every 8 clock cycles.

Uploaded by

ALEMU DEMIRACHEW
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 72

Debre Berhan University

College of engineering
Electrical & Computer Engineering
Department

CoEng3059: Digital Logic Design

Lecture-6
Counters and its Design
December- 2022
03/18/2023 BY Amanuel A. 1
Contents
Introduction
Latches, Flip
Shift register flops and its
Types

Excitation
Counters Table

State
Diagram
2
Sate diagram

Design procedure for


synchronized counter

Type of FF

Flip flops

Types of
Counters

Introduction

Contents
• Counters are one of the most widely used logic
components in digital electronic circuits .
In addition to simply counting they can be used
*to increment memory addresses ; and

Counters
*to divide down clock signals amongst a host of other
applications.
 A counter driven by a clock can be used to count the
number of clock cycles.
 Since the clock pulses occur at known intervals, the counter
can be used as an instrument for measuring time and period of
frequency.
4
• To divide the counters we will look at into two types:

I. Asynchronous and

Types of
II. Synchronous
When used with respect to counters: whether the flip-flops
holding the states of the circuit are all clocked together
(i.e. synchronously) by a master clock or rather
asynchronously, with each flip-flop clocked by the one
preceding it. 5
Are also known as ripple counters;
Are very simple;

Asynchronous
Use the minimum possible hardware (logic gates);
Employ flip-flops connected serially, with each one
triggering (clocking) the next;
Have an overall count which 'ripples' through, meaning
the overall operation is relatively slow;
Require virtually no design 6
 Use interconnected flip-flops, but all are clocked together by the system
clock;

Synchronous
 Use the outputs from the flip-flops, to determine the next states of
the following flip-flops (rather than simply clocking them);

 Require no settling time due to rippling (as all flip-flops are clocked
synchronously);

 Need designing, to determine how the present state of the circuit must be
used to determine the next state (i.e. count);

 Usually need more logic gates for their implementation.


7
 The 'mod' of the counter is the number of states the
counter cycles through before resetting back to its initial state.

Cont’d…
So a binary mod-8 counter has eight count states, from 000 to
111 (e.g. The mod-8 counter actually counts from 0 to 7).
 All of the counters we will look at use flip-flops as the
storage elements that hold the count state. Therefore, a mod-N
counter will need to contain n flip-flops, where 2n>N.

8
The simplest counter circuit can be built using T flip-flops b/c the

ASYNCHRONOUS (SERIAL
OR RIPPLE) COUNTERS
toggle feature is naturally suited for the implementation of the
counting operation.

J-K flip-flops can also be used with the toggle property in hand.

Other flip-flops like D or S-R can also be used, but they may lead to
more complex designs.
9
10

Contents
ASYNCHRONOUS (SERIAL OR RIPPLE) COUNTERS

• The simplest counter circuit can be built using T flip-flops b/c the
toggle feature is naturally suited for the implementation of the
counting operation.
• J-K flip-flops can also be used with the toggle property in hand.
Other flip-flops like D or S-R can also be used, but they may lead to
more complex designs

11
12

Contents
Cont’d…
 The asynchronous counter is simple and straight forward in operation and construction
and usually requires a minimum amount of hardware.
 In asynchronous counters, each flip-flop is triggered by the previous flip-flop out
put, and hence the speed of operation is limited.
 The first stage of the counter changes its state first with the application of the clock
pulse to the flip-flop and the successive flip-flops change their states in turn causing a
ripple-through effect of the clock pluses
 In fact, the settling time of the counter is the cumulative sum of the individual settling
times of the flip-flops. This type of counters is also called ripple or serial counter.
13
14

Contents
Cont’d…

 Figure shows a 3-bit counter capable


of counting from 0 to 7.
 The clock inputs of the three flip-
flops are connected in cascade.
 The T input of each flip-flop is
connected to a constant 1 Fig a. Logic circuit diagram
15
16

Contents
Cont’d…

17
18

Contents
Cont’d…

19
20

Contents
Cont’d…
 The above figure shows a timing diagram for the counter. The value of toggles once each

clock cycle.
 The change takes place shortly after the negative edge of the Clock signal. The delay is
caused by the propagation delay through the flip-flop.
 Since the second flip-flop is clocked by , the value of changes shortly after the negative edge
of the signal. Similarly, the value of changes shortly after the negative edge of the signal.
 If we look at the values as the count, then the timing diagram indicates that the counting
sequence is 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, and so on.
 This circuit is a modulo-8 counter. Since it counts in the upward direction, we call the circuit
an up-counter.
21
22

Contents
Cont’d…

• Table shown the sequence of


binary states that the flip-flops Table1: Count sequence of a 3-bit binary ripple
up-counter
will follow as clock pulses are
applied continuously.
• An n-bit binary counter repeats
the counting sequence for every
(n = number of flip-flops) clock
pulses and has discrete states
from 0 to –1.

23
24

Contents
3-bit binary asynchronous counter with decoded outputs.

 The 3-bit binary ripple counter


with decoded outputs.
 It consists of the same circuit as
shown in timing diagram with
additional decoding circuitry.
 In decoding the states of a ripple
counter, pulses of one clock
duration will occur at the decoding
gate outputs as the flip-flops
change their state.
25
26

Contents
Modulus or MOD-Number of the Counter
The counter shown in Figure above has 8 different states. Thus it is a
MOD-8 asynchronous counter.
The Modulus (or MOD-number) of a counter is the total number of unique
states it passes through in each of the complete cycles.
 Modulus = Where n = Number of flip-flops.
The maximum binary number that can be counted by the counter is –1.
Hence, a 3-flip-flop counter can count a maximum of = – 1 =.
27
28

Contents
3-Bit Binary Ripple Down Counter
 The binary ripple down counter decreases
the count by one, each time a pulse occurs at
the input.
 If you compare this counter with the up-
counter the only difference you will notice is
that, in the down counter the complement
output Q, instead of the normal output, is
connected to the clock input of the next flip-
flop.
 The counter output which is relevant even in
the down counter is the normal output, Q, of
the flip-flops. 29
30

Contents
Waveform or timing diagrams for 3-bit binary down-counter.

31
32

Contents
Up-Down Counters

• The normal and complement


outputs of flip-flops are connected
to AND gates D and E and the
output of the AND gates goes to the
clock input of the next flip-flop via
OR gates F.

33
34

Contents
SYNCHRONOUS (PARALLEL) COUNTERS

 The ripple or asynchronous counter is the simplest to build, but its highest
operating frequency is limited because of ripple action.
 Each flip-flop has a delay time.
 In ripple counters these delay times are additive and the total “settling” time
for the counter is approximately the product of the delay time of a single
flip-flop and the total number of flip-flops.
 These problems can be overcome, if all the flip-flops are clocked
synchronously, The resulting circuit is known as a synchronous counter.
35
36

Contents
Cont’d…
Synchronous counters can be designed for any count sequence (need not be
straight binary). These can be designed following a systematic approach.

37
A 4-bit (MOD-16) synchronous counter
38

Contents
Cont’d…
 A 4-bit synchronous counter with parallel carry is shown in Figure above. In
this circuit the clock inputs of all the flip-flops are tied together so that the
input clock signal may be applied simultaneously to each flip-flop.
 Only the LSB flip-flop A has its T input connected permanently to logic 1
(i.e., VCC), while the T inputs of the other flip-flops are driven by some
combination of flip-flop outputs.
 The T input of flip-flop B is connected to the output of flip-flop A; the T
input of flip-flop C is connected with the AND-operated output of and .
39
40

Contents
Design procedure for synchronized counter

 The following steps are used to design mode N counter

Step-1- state diagram


Step-2- state table
Step-3- state assignment(giving values for state)
Step-4- excitation state from truth table of the flip-flop
Step-5-Excitation map (using k-map)
Step-6- schematic diagram of mode n
41
42

Contents
Cont’d…
 For example to design Mode 3 counter
Step 1-state diagram Step2-state table
PS( previous state) NS (next state)
a
a b
b b c
c c a

Step 3-state assignment PS NS


q1 q0 Q1 Q0
a= 00, b=01, c=10
0 O 0 1
0 1 1 0
1 0 0 0
1 1 d d
43
44

Contents
Step 4-excitation table
PS NS Excitation state
q1 q0 Q1 Q0 J1 K1 J0 K0

0 0 0 1 0 d 1 d
0 1 1 0 d d d 1
1 0 0 0 d 1 0 d
1 1 d d d d d d
Step 5- excitation map
For J1 For K1 For Jo For K
q0 q0 q0 q0
q1 1 q1 d q 1d 1 q1 d d 1

d d 1 d d d 1

45
46

Contents
Cont’d…
There for from the k-map drown above we can design the
counter with k-map simplified equation
=
==1
=

+5V

47
48

Contents
REGISTERS
INTRODUCTION
 Registers are the group of flip-flops (single bit storage element).
 The simplest type of register is a data register, which is used for the temporary
storage of data.
 In its simplest form, it consists of a set of N, D flip-flops, all sharing a common
clock.
 All of the digits in the N bit data word are connected to the data register by an N
line “data bus”.
49
50

Contents
Cont’d…

 Fig bellow shows a four bit data register, implemented with four D flip flops

The data register is said to be a synchronous device, because all the flip flops change
state at the same time.

51
52

Contents
SHIFT REGISTERS

 A common form of register used in many types of logic circuits is a


shift register.
 The function of storage of binary data can be very well performed by a
simple register. Shift registers are required to do much more than that.
 They are required to store binary data momentarily until it is utilized
for instance, by a computer, microprocessor, etc.

53
54

Contents
Cont’d…

55
56

Contents
Cont’d…

 Sometimes data is required to be presented to a device in a manner which


may be different from the way in which it is fed to a shift register.
 For instance, shift register can present data to a device in a serial or
parallel form, irrespective of the manner in which it is fed to a shift register
 Data can also be manipulated within the shift register, so that it is
presented to a device in the required form

57
58

Contents
Cont’d…

 These devices can also shift left or right and it is this capability which
gives them the name of shift register.
 There are two ways to shift data into a register (serial or parallel) and
similarly two ways to shift the data out of the register.
 This leads to the construction of four basic types of registers as shown in
Figures bellow, All of the four configurations are commercially available.

59
60

Contents
Cont’d…
They are
1) Serial in/Serial out (SISO) – 54/74L91, 8 bits
2) Serial in/Parallel out (SIPO) – 54/74164, 8 bits
3) Parallel in/Serial out (PISO) – 54/74265, 8 bits
4) Parallel in/Parallel out (PIPO) – 54/74198, 8 bits

61
62

Contents
Cont’d…

63
SERIAL-IN–-SERIAL-OUT SHIFT REGISTER

 From the name itself it is obvious that this type of register accepts data
serially, i.e., one bit at a time at the single input line.
 The output is also obtained on a single output line in a serial fashion.
 The data within the register may be shifted from left to right using shift-
left register, or may be shifted from right to left using shift-right register.

64
65

Contents
SERIAL-IN–PARALLEL-OUT REGISTER

 In this type of register, the data is shifted in serially, but shifted out in
parallel.
 To obtain the output data in parallel, it is required that all the output bits are
available at the same time.
 This can be accomplished by connecting the output of each flip-flop to an output
pin.

 Once the data is stored in the flip-flop the bits are available simultaneously .

66
67

Contents
PARALLEL-IN–SERIAL-OUT REGISTER

 In the preceding two cases the data was shifted into the registers in a
serial manner.
 Now can develop an idea for the parallel entry of data into the
register.
 Here the data bits are entered into the flip-flops simultaneously,
rather than a bit-by-bit basis.

68
69

Contents
PARALLEL-IN–PARALLEL-OUT REGISTER

 There is a fourth type of register already mentioned which is designed


such that data can be shifted into or out of the register in parallel.
 In this type of register there is no interconnection between the flip-
flops since no serial shifting is required.
 Hence, the moment the parallel entry of the data is accomplished the
data will be available at the parallel outputs of the register.

70
71

Contents
O U F O R
f o r a
THA N K Y
T IO N !!
n i n g e
R AT T EN
p l a n u a r
Y OU
u rea yo
, I f a n t
y o
I f As sone r i c e e , p l
o w door e c a d
closes f o r
a r, a d i n g
ye g f o r l a n n
l f ! !
another
n n i n alwaysa r e p opens. r s e
pl a y o u e y o u
s , I f u c a t
tr e e e , e d
f e t i m
al i
03/18/2023 72

You might also like