A Johnson counter, also known as a twisted-ring counter or Moebius counter, is a type of digital shift register that cycles through a specific pattern of states. It is a modification of the traditional ring counter and is commonly used in digital electronics and sequential logic circuits.
A Johnson counter consists of a series of flip-flops (usually D-type flip-flops) connected in a closed loop, forming a ring-like structure. Each flip-flop is driven by the output of the previous flip-flop, creating a cascading effect. The last output feeds back to the input of the first flip-flop, completing the loop. The number of flip-flops in the Johnson counter determines the number of unique states the counter can cycle through.
The shifting pattern of a Johnson counter is such that only one bit changes at a time as it progresses through the states. This unique characteristic makes Johnson counters useful in certain applications where a specific sequence is required, and it eliminates the undesired glitches or invalid states that can occur in other types of counters.
The shifting pattern of a 4-bit Johnson counter (also known as a 4-stage Johnson counter) is as follows:
Initial State: 0000
1st Shift: 0001
2nd Shift: 0011
3rd Shift: 0111
4th Shift: 1110
5th Shift: 1100
6th Shift: 1000
7th Shift: 0001 (cycle repeats)
As you can see, only one bit changes at a time as the counter shifts from one state to another. This pattern creates a "rolling" effect, which is why the Johnson counter is sometimes referred to as a "rotating" or "twisted-ring" counter.
The number of states a Johnson counter can cycle through is equal to 2^n, where n is the number of flip-flops in the counter. In this example, with four flip-flops, the Johnson counter can cycle through 2^4 = 16 unique states before repeating the pattern.
Note that the number of flip-flops used in a Johnson counter can vary depending on the specific application and the desired sequence length. The example above illustrates a 4-bit Johnson counter, but Johnson counters can be designed with any number of stages to suit different requirements.