The Johnson CounterAugust 20, 2007
Johnson counters, or Möbius counters (sometimes referred to with that name because of the abstract similarity to the famous Möbius strip) are extremely useful.
The Johnson counter is made of a simple shift register with an inverted feedback – as can be seen below.
Johnson counters have 2N states (where N is the number of flip-flops) compared to 2^N states for a normal binary counter.
Since each time only a single bit is changing – Johnson counter states form a sort of a Gray code. The next picture shows the 12 states of a 6 bit Johnson counter as an example.
Johnson counters are extremely useful in modeling, since by using any of the taps one could generate a clock like pattern with many different phases. You could easily see that by looking at the columns in the picture above, they all have 6 consecutive “1″s followed by 6 consecutive “0″s, but all in a different phase.
Decoding the state of the counter is extremely easy. A single 2 input gate which detects the border between the “1″s and the “0″s is enough. One needs not compare the entire length of the counter to some value.
One can also generate an odd length “sort-of” Johnson counter. The easiest way is by using a NOR feedback from the last two stages of the shift register as shown below.
The last picture shows the 11 states of the modified 6 flip-flop Johnson counter. Looking at the states sequence it is immediately noticeable that the 11…11 stage is skipped. We also lose the Gray property of the counter like that, since on a single case both the last and first bits will change simultaneously. But looking at the columns, which represent the different taps, we see that we kept the same behavior on each column (with respect to the signal shape) but the duty cycle is not 50% anymore – that is obvious because we no longer have an even amount of states.
This post is becoming a bit too long to present all the cool things that can be done with Johnson counters, but a very important issue is robustness. In a future post we will see that serious designers do not use just a simple inverter for the feedback path, but also include some sort of self correction mechanism. This is necessary, because if a forbidden state creeps in (wrong reset behavior, crosstalk, etc) it will stay forever in the counter – sort of like the same problem we had in one of the previous posts on the ring counter. There are ways to get over this problem, and I will try to analyze them in a future post. Stay tuned…