Types of Counters
Ripple counter:
We can attach more flip-flops to make larger counter. We just use more flip-flops in cascade and give output of first to the clock of 2nd and output of 2nd to clock of 3rd and so on. This way every flip-flop would divide frequency of the clock by 2 and hence we can obtain a divide by larger value circuit. Let’s see how we can make larger counters:
We can attach more flip-flops to make larger counter. We just use more flip-flops in cascade and give output of first to the clock of 2nd and output of 2nd to clock of 3rd and so on. This way every flip-flop would divide frequency of the clock by 2 and hence we can obtain a divide by larger value circuit. Let’s see how we can make larger counters:
And following waveforms would illustrate how the above circuit does counting. It is actually a MOD-8 counter so it would count from 0 to 7 and then again reset itself as shown:
With every negative edge, count is incremented and when the count reaches 7, next edge would reset the value to 0.
These waveforms represent count as (Q3 Q2 Q1) 2.
With every negative edge, count is incremented and when the count reaches 7, next edge would reset the value to 0.
These waveforms represent count as (Q3 Q2 Q1) 2.
Ring counter:
This is a special type of register in which 1 moves in the output in the ring i.e. initially output of 1st FF is 1. On next edge this 1 is transferred to output of 2nd FF while previous output becomes 0. Similarly on next clock output of 3rd FF becomes 1. Similarly it continuous till last FF goes 1. After this 1st FF goes 1 goes again and whole procedure is repeated. This way 1 is moved in a ring as:
Clock Q4 Q3 Q2 Q1
Initially 0 0 0 1
1st tick 0 0 1 0
2nd 0 1 0 0
3rd 1 0 0 0
4th 0 0 0 1
And so on
Hence we use only 4 states out of 16 states possible in Ring counter.
Or we can say there are 12 unused states in Ring counter.
To start the Ring counter, we firstly give START=0 and then right most FF is set and all others are reset and hence initial output is 0001.
We can also realize Ring counter using JK flip-flop as:
We can also realize Ring counter using JK flip-flop as:
Application:
We can use Ring counter in the system where we have to perform different operations sequentially and repeatedly. Suppose we have to do operations A, B, C & D. Firstly we have to do A, then B, then C, and then D. after performing all operations we have to perform operation A and so on. In this case we can use Ring counter to initiate these operations sequentially.
Johnson Counter:
While Ring counter, we have connected Q of last to D of 1st FF, but in Johnson Counter we connect Q bar of last to D of 1st FF as shown below and we also don’t need to connect preset of 1st FF. This is also called Twisted Ring counter:
And JK implementation is as follow:
And we have output as follows:
Clock Q4 Q3 Q2 Q1
Initially 0 0 0 0
1st tick 0 0 0 1
2nd 0 0 1 1
3rd 0 1 1 1
4th 1 1 1 1
5th 1 1 1 0
6th 1 1 0 0
7th 1 0 0 0
8th 0 0 0 0
We can also note that we use only 8 out of 16 possible states and in general we have used 2n states and hence we have 2n-2n unused states.