Jotrin Electronics
Carrello
arrow
Descrizione Quantità Totale (USD) Operazione
loading
Carrello della spesa prodotti
Carrello della spesa prodotti : 0
Home > Other > Johnson Counter: Circuit Diagram, Truth Table, Pros & Cons

Johnson Counter: Circuit Diagram, Truth Table, Pros & Cons

tempo di aggiornamento: 2024-01-03 14:48:50

Contents

Johnson counters are mechanisms in digital electronics to store, process, or count events in a given system. These devices are digital sequential logic setups tasked with keeping track of multiple pulse events. Constructed from an array of flip flops and paired with an extra clock signal, they're pivotal in various digital functions to gauge specific occurrences or pulses. Their operation might follow a predetermined pattern or a design-specific sequence. Among their variants are the Synchronous, Asynchronous/Ripple, Up/Down, Ring, Johnson, Decade, Modulus, and Cascaded counters.


What is Johnson Counter?


A Johnson counter, often called a creeping counter, is a synchronous counter variant. Within this counter, the inverted output of the final flip-flop is linked to the first flip-flop's input. To establish an n-bit Johnson counter, n flip-flops are necessary. This counter is a prominent shift register type characterized by the return of its output to its initial input. Essentially, a Johnson counter operates as an inverted ring. Besides "creeping counter," other names for the Johnson counter include twisted ring counter, walking counter, mobile counter, and switch tail counter.


What is Johnson Counter.jpg

Johnson Counter Circuit Diagram


The Johnson counter circuit diagram showcases a sequential connection of 'n' flip-flops. In this configuration, the outcome from one flip-flop serves as the input for the following one. For instance, the negated outcome of the terminal flip-flop 'Q̅n' loops back to the inaugural flip-flop's sequence bit pattern. This counter works in a self-contained cycle, rotating within its framework.


Johnson Counter Circuit Diagram.jpg


Take the 4-bit Johnson counter as an illustration; it incorporates 4 D flip-flops, hence termed a 4-bit Johnson counter. This counter is equipped with preset and clear connectors, enabling the initiation or restarting of the count.


The Reset connector functions similarly to a toggle, allowing the activation of the flip-flops with a simple press.


The CLK connector plays a pivotal role in monitoring alterations in the flip-flop outputs.


Typical Johnson counters with 2, 3, or 4 stages are adept at modulating clock signal frequencies by utilizing diverse feedback pathways. For instance, a tri-stage Johnson counter can serve as a three-phase, 120-degree phase-shift square wave originator. The 5-stage variant is a synchronous decade counter (like CD4017) or a division mechanism. Conversely, the bi-stage model functions as a quadrature oscillator, yielding distinct 90-degree phase-shifted outputs relative to its input signal.


How Does a Johnson Counter Work?


To get a clearer picture of the Johnson counter's working, we'll delve into the 3-bit Johnson counter as an example. The table below presents the truth table for this specific 3-bit Johnson counter.


Truth Table


StateQ0Q1Q2
0000
1100
2110
3111
4011
5001


Reflect on the 3-bit Johnson counter's truth table. The outcome of one flip-flop becomes the input for its successor. The clock signal (CLK) aids in observing variations in the output. This counter encompasses three flip-flops, with Q0, Q1, and Q2 representing their respective outputs. The counter tracks the states' progression in a perpetual loop.


Before the CLK's rising edge, the input D is marked as Q0.


With the advent of CLK's rising edge, Q1 mirrors the value of Q0.


Without a clock pulse (0), the counter's output stands at 000.


For CLK=1, the counter displays an output of 100.


At CLK=2, the output reads 110.


For CLK=3, it's 111.


When CLK reaches 4, the output becomes 011.


And at CLK=5, it's 001.


The 3-bit Johnson counter's MOD is 6, indicating six distinct state configurations. This entire operation adheres to a sequential bit arrangement.


Johnson Counter Verilog Code


The Johnson counter operates by tracking 2N states when there are N bits. In this context, we're translating its function using the HDL known as Verilog. The Verilog code of 3-bit Johnson Counter is shown below:


///////Verilog Code Johnson COunter //////


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 comprises 4 D flip-flops and progresses through 8 distinct cycles. The negated outcome of the final flip-flop loops back as the inaugural input.


4 bit Johnson Counter.png


  • In the illustrated diagram, ABCD represents the flip-flop outputs following the 4-bit sequence.

  • The input for 'D' corresponds to the inverted result of the terminal flip-flop.

  • The 'CLK' plays a role in monitoring the progression or cycles of the counter within its self-contained circuit.

  • The reset connector functions like a toggle switch.

  • Given that the data circulates within a continuous loop, this counter can be instrumental in recognizing different data patterns or values.

  • For instance, with a clock pulse present, the sequential outputs of the flip-flops might appear as 1000, 1100, 1110, 1111, 0111, 0011, 0001.

  • Without a clock pulse, the output remains static at 0000.


CPQ1Q2Q3Q4
00000
11000
21100
31110
41111
50111
60011
70001
80000

4-bit Johnson counter truth table


The table above indicates the counter outputs under different clock pulse inputs:


  • The counter outputs 0000 when there is no clock input (0).

  • The counter outputs 1000 with the first clock pulse.

  • The counter outputs 1100 with the second clock pulse.

  • The counter outputs 1110 with the third clock pulse.

  • The counter outputs 1111 with the fourth clock pulse.

  • The counter outputs 0111 with the fifth clock pulse.

  • The counter outputs 0011 with the sixth clock pulse.

  • The counter outputs 0001 with the seventh clock pulse.

  • The counter outputs 0000 with the eighth clock pulse.



Here,

CP stands for the clock pulse,

while Q1, Q2, Q3, and Q4 represent the states.


Question: How many used and unused states exist in a 4-bit Johnson counter?


Answer:

Count of utilized states = 2 times n

= 2 multiplied by 4

= 8

Count of unutilized states = 2 to the power of n minus 2 times n

= 2 to the power of 4 minus 2 multiplied by 4

= 16 minus 8

= 8.


Johnson Counter with 10 Timing Signals


   


What is the Difference Between Ring Counter and Johnson Counter?


The primary difference between a ring counter and a Johnson counter lies in how they're connected: in the Johnson counter, the inverted output from the final flip-flop is looped back to serve as the input to the first flip-flop.


The quantity of input clock pulses provided to the flip-flops for a ring counter matches the number of stages. Consequently, the MOD of an n-bit ring counter is 'n'.


Conversely, in a Johnson counter, the quantity of input clock pulses is divided by a factor that doubles the number of stages. Hence, the MOD of an n-bit Johnson counter stands at '2n'.



 

What are the Advantages and Disadvantages of Johnson Counter?


The Johnson counter has its own set of advantages and disadvantages when compared to other counter types. Let's break them down:


Advantages


  • A Johnson counter can register double the states using the same flip-flops as a ring counter.

  • It can self-start from an all-zero state, eliminating the need for external initiation.

  • The counter yields a code where neighboring states have a bit difference of just one (a Hamming distance of a single unit), valuable for spotting errors or asynchronous evaluations.

  • Johnson counters can double as frequency dividers or pattern detectors.


Disadvantages


  • Unlike traditional counters, Johnson counters don't operate in binary sequences, potentially narrowing its functional scope in particular scenarios.

  • It harbors a larger volume of unused states than utilized ones, potentially compromising its effectiveness or amplifying its intricacy.

  • The counter mandates half the quantity of flip-flops relative to timing signals, which could augment its expense or physical dimensions.


Applications of Johnson Counter


  • The Johnson counter serves as a synchronous ten-step counter or partitioning circuit.

  • It's employed in hardware design to craft intricate Finite State Machines, like those in ASIC and FPGA setups.

  • A 3-tier Johnson counter is a 3-phase square wave producer, generating a 120° phase shift.

  • It modifies the frequency of the clock signal through adjustable feedback.

  • These counters are commonly used for frequency division and pattern identification.


Conclusion


The Johnson counter is a digital sequential logic device designed to tally events or pulses within a system. Sometimes, it's referred to as a twisted ring counter, walking ring counter, creeping counter, or switch-tail counter. This setup includes n flip-flops configured as a shift register, with the inverted output from the last flip-flop being fed back into the first. When weighed against other counters, it brings its own benefits and drawbacks. It finds multiple uses in the realm of digital electronics.


Read More


Precedente: C945 Transistor Pinout, Features, Equivalent, and Datasheet

Prossimo: The Ultimate Guide to Ring Counter: Working, Types & Applications

FAQ

  • What are the names of Johnson counter?
  • The Johnson counter is an adapted ring counter where the output of the final flip flop is inverted and then channeled back as input to the initial one. It's also called an Inverse Feedback Counter or a Twisted Ring Counter.

  • Is a Johnson counter a synchronous counter?
  • The Johnson counter, often called the creeping counter, serves as a type of synchronous counter.

  • What is the modulus of a 4-bit Johnson counter?
  • The modulus of a counter refers to the total number of distinct states it can adopt during a counting sequence. For instance, a four-bit counter that ranges from 0000 to 1111 has 16 unique states, giving it a modulus of 16.

  • How many states are there in the Johnson ring counter?
  • In a Johnson counter, the outputs from the flip-flops can be straightforwardly decoded to a singular state. For instance, in a 4-stage Johnson counter's eight states, each state can be decoded using no more than a two-input gate.

  • What is the timing sequence of Johnson counter?
  • The Johnson counter circulates a sequence of ones succeeded by zeroes throughout the loop. Take a four-register counter as an example; starting with register values of 0000, the recurring sequence unfolds as: 0000, 1000, 1100, 1110, 1111, 0111, 0011, 0001, 0000...

  • What is D flip flop?
  • The D-FLIP FLOP, often referred to as a clocked or delay flip-flop, mirrors its input and transitions by the D input.

  • What is an asynchronous counter?
  • It takes input on a flip-flop and governs the outputs independent of the input clock pulses provided.

  • What is the purpose of a truth table?
  • The truth table comprises multiple rows and columns, presenting logical variables and their combinations to understand the circuit's logical operation. It offers a comprehensive view of all potential values within the circuit's logical function.

  • What is the full form of D flip flop?
  • The "D" in D flip flop stands for "Data." When triggered, this flip-flop type holds the value present at its data input.

Ratings and Reviews

Reviews
 

Carrello

Acconto

jotrin03

Chat dal vivo

sales@jotrin.com