Counters
COUNTERS
Like shift registers and other combinational circuits, there is another important element in digital
electronics which we use most. They are counters. Counters are used not only for counting but
also for measuring frequency and time ; increment memory addresses .
Counters are specially designed synchronous sequential circuits, in which, the state of the
counter is equal to the count held in the circuit by the flip flops. Counters calculate or note down
the number that how many times an event occurred.
Counters are the crucial hard ware components, and are defined as “The digital circuit which is
used to count the number of pulses”. Counters are well known to us as “Timers”. Counter
circuits are the best example for the flip flop applications. Counters are designed by grouping of
flip flops and applying a single clock signal to them. In simple words, the counters are those,
which have the group of storage elements like flip flops to hold the count.
Counters have modes. The ‘mod’ of the counter represents the number of states of the cycles
through it, before setting the counter to its initial state. For example, a binary mod 8 counter has
8 countable states. They are from 000 to 111. So the mod 8 counter counts from 0 to 7.
A binary mod 4 counter has 4 count states, from 000 to 011. So the mod 4 counter counts from 0
to 4. This means, in general a mod N counter can contain n number of flip flops, where 2n = N.
Need of Counters
Counting means incrementing or decrementing the values of an operator, with respect to its
previous state value. So to perform the mathematical operation we use no devices other than
counters. We cannot perform this action (counting) with any other logic devices rather than
counters.
Types of counters
There are two types of counters available for digital circuits, they are
1. Synchronous counters
2. Asynchronous counters
Different types of counters are explained below.
Synchronous counters
The counters which use clock signal to change their transition are called “Synchronous
counters”. This means the synchronous counters depends on their clock input to change state
values. All flip flops in the synchronous counters are triggered by same clock signal.
Features:
Their construction is very simple in design. All the flip flops are interconnected and will
be driven by same clock signal.
The state output of the previous flip flop determines the state change of the present flip
flop.
As all the flip flops will work synchronously, the synchronous counters don’t require
settling.
We require number of logic gates to implement the synchronous counters.
Their operation is fast.
Sanatan Dharma College, Ambala Cantt
Counters
Asynchronous counters
Definition: The counters in which the change in transition doesn’t depend upon the clock signal
input is known as “Asynchronous counters”. In these counters, the first flip flop is connected to
the external clock signal, and the rest are clocked by the state outputs (Q & Q’) of the previous
flip flop.
Features:
Another name for Asynchronous counters is “Ripple counters”.
These are very simple in design.
As its design is simple, they use less number of logic gates to construct an asynchronous
counter.
Operation of asynchronous counters is very slow compared to synchronous counters.
Asynchronous Vs Synchronous Counters
Let’s compare the operation and features of synchronous and asynchronous counters. Their
differences are listed below.
SYNCHRONOUS COUNTERS ASYNCHRONOUS COUNTERS
The propagation delay is very low. Propagation delay is higher than that of synchronous
counters.
Its operational frequency is very high. The maximum frequency of operation is very low.
These are faster than that of ripple These are slow in operation.
counters.
Large number of logic gates are required Less number of logic gates required.
to design
High cost. Low cost.
Synchronous circuits are easy to design. Complex to design.
Standard logic packages available for For asynchronous counters, Standard logic packages are
synchronous. not available.
Sanatan Dharma College, Ambala Cantt
Counters
Practical example of counter
We use counters in many applications. Where ever we come across the use of timers, there we
use counters of synchronous type.
For suppose, in our kitchen appliances, we use microwave ovens. In that we set some
temperature to heat the food item kept in it. Internally the counter calculates the increase
or decrease in temperature and time. If it reaches the pre-set temperature, then it prevents
from further heating and spoiling of that food item.
Washing machines: We use counters in washing machines also. Similar to the counting
operation in microwave oven, the counter in washing machine counts the time which we
set it to operate.
In both microwave oven and washing machine, we set the device to particular time, and
it starts decreasing for every second. When the value of counter becomes zero, it
activates the switch ON / OFF. Thus the operation of the device is controlled by
counters.
Some other applications of counters: To calculate the number of people entering and leaving a
stadium or auditorium we use , counters at entry gate or door. These counters will count the
persons. For entry of each person, the value of counter increases by 1. In the same manner, for
every leaving of each person, the counter value decreases by 1.
Applications of counters
Counter found their applications in many digital electronic devices. Some of their applications
are listed below.
Frequency counters
Digital clocks
Analog to digital convertors.
With some changes in their design, counters can be used as frequency divider circuits.
The frequency divider circuit is that which divides the input frequency exactly by ‘2’.
In time measurement. That means calculating time in timers such as electronic devices
like ovens and washing machines.
We can design digital triangular wave generator by using counters.
There are many other type of counters rather than synchronous and asynchronous counters, such
as Decade counter, Binary counter, Ring counter, Johnson counter, Up / Down counter etc. ,
which we will discuss about them in our upcoming sessions.
Sanatan Dharma College, Ambala Cantt
Counters
Ripple counter –
A n-bit ripple counter can count up to 2n states. It is also known as MOD n counter. It is known
as ripple counter because of the way the clock pulse ripples its way through the flip-flops. Some
of the features of ripple counter are:
1. It is an asynchronous counter.
2. Different flip-flops are used with a different clock pulse.
3. All the flip-flops are used in toggle mode.
4. Only one flip-flop is applied with an external clock pulse and another flip-flop clock is
obtained from the output of the previous flip-flop.
5. The flip-flop applied with external clock pulse act as LSB (Least Significant Bit) in the
counting sequence.
A counter may be an up counter that counts upwards or can be a down counter that counts
downwards or can do both [Link] up as well as count downwards depending on the input
control. The sequence of counting usually gets repeated after a limit. When counting up, for n-
bit counter the count sequence goes from 000, 001, 010, … 110, 111, 000, 001, … etc. When
counting down the count sequence goes in the opposite manner: 111, 110, … 010, 001, 000,
111, 110, … etc.
A 3-bit Ripple counter using JK flip-flop –
In the circuit shown in above figure, Q0(LSB) will toggle for every clock pulse because JK flip-
flop works in toggle mode when both J and K are applied 1, 1 or high input. The following
counter will toggle when the previous one changes from 1 to 0
Sanatan Dharma College, Ambala Cantt
Counters
Truth Table –
The 3-bit ripple counter used in the circuit above has eight different states, each one of which
represents a count value. Similarly, a counter having n flip-flops can have a maximum of 2 to
the power n states. The number of states that a counter owns is known as its mod (modulo)
number. Hence a 3-bit counter is a mod-8 counter.
A mod-n counter may also be described as a divide-by-n counter. This is because the most
significant flip-flop (the furthest flip-flop from the original clock pulse) produces one pulse for
every n pulses at the clock input of the least significant flip-flop (the one triggers by the clock
pulse). Thus, the above counter is an example of a divide-by-4 counter.
Timing diagram – Let us assume that the clock is negative edge triggered so above counter will
act as an up counter because the clock is negative edge triggered and output is taken from Q.
Counters are used very frequently to divide clock frequencies and their uses mainly involve in
digital clocks and in multiplexing. The widely known example of the counter is parallel to serial
data conversion logic.
As well as counting “up” from zero and increasing or incrementing to some preset value, it is
sometimes necessary to count “down” from a predetermined value to zero allowing us to
produce an output that activates when the zero count or some other pre-set value is reached.
This type of counter is normally referred to as a Down Counter, (CTD). In a binary or BCD
down counter, the count decreases by one for each external clock pulse from some preset value.
Special dual purpose IC’s such as the TTL 74LS193 or CMOS CD4510 are 4-bit binary Up or
Down counters which have an additional input pin to select either the up or down count mode.
Sanatan Dharma College, Ambala Cantt
Counters
4-bit Count Down Counter
In the 4-bit counter above the output of each flip-flop changes state on the falling edge (1-to-0
transition) of the CLK input which is triggered by the Q output of the previous flip-flop, rather
than by the Q output as in the up counter configuration. As a result, each flip-flop will change
state when the previous one changes from 0 to 1 at its output, instead of changing from 1 to 0.
Bidirectional Counter
Both Synchronous and Asynchronous counters are capable of counting “Up” or counting
“Down”, but their is another more “Universal” type of counter that can count in both directions
either Up or Down depending on the state of their input control pin and these are known
as Bidirectional Counters.
Bidirectional counters, also known as Up/Down counters, are capable of counting in either
direction through any given count sequence and they can be reversed at any point within their
count sequence by using an additional control input as shown below.
Sanatan Dharma College, Ambala Cantt
Counters
Synchronous 3-bit Up/Down Counter
The circuit above is of a simple 3-bit Up/Down synchronous counter using JK flip-flops
configured to operate as toggle or T-type flip-flops giving a maximum count of zero (000) to
seven (111) and back to zero again. Then the 3-Bit counter advances upward in sequence
(0,1,2,3,4,5,6,7) or downwards in reverse sequence (7,6,5,4,3,2,1,0).
Generally most bidirectional counter chips can be made to change their count direction either up
or down at any point within their counting sequence. This is achieved by using an additional
input pin which determines the direction of the count, either Up or Down and the timing
diagram gives an example of the counters operation as this Up/Down input changes state.
Nowadays, both up and down counters are incorporated into single IC that is fully
programmable to count in both an “Up” and a “Down” direction from any preset value
producing a complete Bidirectional Counter chip. Common chips available are the 74HC190
4-bit BCD decade Up/Down counter, the 74F569 is a fully synchronous Up/Down binary
counter and the CMOS 4029 4-bit Synchronous Up/Down counter.
Sanatan Dharma College, Ambala Cantt