What is Johnson Counter : Circuit Diagram, Truth Table & Its Applications

In digital electronics, johnson counters are used to store or process or count the number of events occurred within the circuit. It is one of the digital sequential logic circuits that count several pulses. These are designed with a group of flip-flops with an additional clock signal. In every digital logic and computing, these are used to count the specific event or pulse happening in the circuit and also follows a certain sequence or any random sequence based on the design. There are different types, such as Synchronous counters, Asynchronous/Ripple counters, Up/Down Counter, Ring counter, Johnson counter, Decade counter, Modulus counter, Cascaded counter


What is Johnson Counter?

Definition: It is also known as a modified ring counter. It is designed with a group of flip-flops, where the inverted output from the last flip-flop is connected to the input of the first flip-flop. Generally, it is implemented by using D flip-flops or JK flip-flops. It is also known as an inverse feedback counter or twisted ring counter. This follows the sequence of bit patterns. When compared to the ring counter, it uses only half of the number of flip-flops. So, the MOD will be 2n, if there are n flip-flops.

Circuit Diagram

The johnson counter circuit diagram is the cascaded arrangement of ‘n’ flip-flops. In such design, the output of the proceeding flip-flop is fed back as input to the next flip-flop. For example, the inverted output of the last flip-flop ‘Q̅n’ is fed back to the first flip-flop in the sequence bit pattern. The counter registers cycles in a closed-loop i.e circulates within the circuit.

counter-circuit
counter-circuit

Consider the 4-bit Johnson counter, it contains 4 D flip-flops, which is called 4-bit Johnson counter. It has preset and clear pins to initialize or start and reset the counted.

Reset pin acts as an on/off switch. So, the flip-flops can be enabled by clicking the Reset switch.

CLK pin is used to observe the changes in the output of the flip-flops.

PCBWay

Standard 2,3 and 4 stages johnson counters are used to divide the frequency of clock signals with the help of varying feedback connections. For example, a 3-stage johnson counter can be used as a 3-phase and 120 degrees phase shift square wave generator. 5-stage Johnson counter is used as a synchronous decade counter (CD4017) or divider circuit. 2-stage acts as a quadrature oscillator or generator that produces individual output signals of 90 degrees each concerning the input signal.

Truth Table

Consider the truth table of the 3-bit Johnson counter. The output of the proceeding flip-flop is connected as the input of the next flip-flop. The clock signal(CLK) is used to know the changes in the output. It contains 3 flip-flops, Q0, Q1, Q2 are the outputs of the flip-flops. The counter counts the state of cycles in a continuous closed loop.

State

Q0 Q1

Q2

0 0 0

0

1

1 0 0

2

1 1 0
3 1 1

1

4 0 1

1

5 0 0

1

The input D is just before the rising edge of the clock (CLK), denoted as Q0.

When the CLK rising edge occurs, the output Q1 is the value of Q0.

When there is no clock pulse (0), the output of the counter is 000.

When CLK=1, the output of the counter is 100.

When CLK=2, the output of the counter is 110.

When CLK=3, the output of the counter is 111.

When CLK=4, the output of the counter is 011.

When CLK=5, the output of the counter is 001.

The MOD of the 3-bit johnson counter is 6. Hence there are 6 uniques numbers of states. The complete process is in the sequence bit pattern.

Johnson Counter Verilog Code

If the no.of bits or flip-flops is ‘n’, then the johnson counter countess 2n events or states or cycles.

The verilog HDL code of 3-bit Johnson counter is shown below,

///////Verilog Code Johnson

module johnson_counter( out,reset,clk);

input clk,reset;

output [3:0] out;

reg [3:0] q;

always @(posedge clk)

begin

if(reset)

q=4’d0;

else

begin
q[3]<=q[2];

q[2]<=q[1];

q[1]<=q[0];

q[0]<=(~q[3]);
end

end

assign out=q;

endmodule

//////End////

4-bit Johnson Counter

The 4-bit johnson counter contains 4 D flip-flops and it counts 8 no.of cycles. The inverted output of the last flip-flop is fed back as input to the first flip-flop.

  • From the figure, ABCD is the outputs of the flip-flop in the 4-bit pattern.
  • The input value of ‘D’ is the inverted output of the last flip-flop.
  • The ‘CLK’ is used to count the states or cycles of the counter, which is in the closed-loop.
  • The reset pin is used as an on/off switch.
  • As the data will be rotating around a continuous closed loop, a counter can also be used to detect various patterns or values within the data.
  • For example, when there is a clock pulse, the output pattern of the flip-flops would be 1000, 1100, 1110, 1111, 0111, 0011, 0001
  • When there is no clock pulse, the output will be 0000.

Difference Between Ring Counter and Johnson Counter

The difference between the ring counter and johnson counter is, the inverter output of the last flip-flop is connected back as the input to the first flip-flop.

In-ring counter, the no.of input clock pulses given to the flip-flops are equal to the no.of stages. That means the MOD of the n-bit ring counter is ‘n’.

In johnson’s counter, the no.of input clock pulses divide by a factor of twice equal to the no.of stages. That means the MOD of the n-bit johnson counter is ‘2n’.

Advantages/Disadvantages of Johnson Counter

The advantages and disadvantages include the following.

Advantages

The advantages are

  • The johnson counter counts the no.of stages twice equal to the no.of clock pulses given to the flip-flops.
  • It counts the events in a continuous closed loop within the circuit.
  • It can be designed by using D and JK flip-flops
  • It can be used as a self-decoding circuit.

Disadvantages

The disadvantages are

  • It cannot be used to count the binary sequence
  • It doesn’t utilize all the stages equal to the no.of stages in the counter.
  • It needs only half the no.of flip-flops on half the no.of timing signals
  • It is used in any timing sequence.

Applications

The applications of johnson counter are

  • Johnson counters are used as frequency dividers and pattern recognizers.
  • It is used as a synchronous decade counter and divider circuit
  • It can be used to create complicated finite state machines in hardware logic design.
  • The 3-bit johnson counter is used as a 3-phase square wave generator to produce 120 degrees phase shift
  • The frequency of the clock signal is divided by varying their feedback.

FAQs

1). What is the difference between the ring counter and Johnson counter?

The MOD of the n-bit ring counter is ‘n’ whereas the MOD of the n-bit Johnson counter is ‘2n’.

2). What is D flip flop?

The D-FLIP FLOP is also called as a clocked flip-flop or delay flip-flop, which tracks the input and makes the transitions equal to the input D.

3). What is an asynchronous counter?

It inputs on a flip-flop and has control over the outputs regardless of input clock pulses applied.

4). What is the purpose of a truth table?

The truth table contains several rows and columns with logical variables and combinations to know the logical functioning of the circuit. It provides all the possible values in the logical function of the circuit.

5). What is the full form of D flip flop?

The full form of the d-flip flop is Data-flip flop, which stores the value that is on the data line.

Thus this is all about the working, circuit and truth table of Johnson counter. The purpose of the Johnson counter is to count or store the number of events when the inverted output is given as input to the first flip-flop and also called as modify. Here is a question for you, “What is 8-bit Johnson Counter?”.