Johnson decade counters - classification confusion

Discussion in 'Electronics Resources' started by nDever, Dec 13, 2014.

  1. nDever

    Thread Starter Active Member

    Jan 13, 2011
    154
    4
    Hey all,

    Someone please correct me here if I'm wrong, but I thought that a Johnson counter and a decade counter were two different and distinct counters.

    The CD4026 is described in this datasheet (https://www.jameco.com/Jameco/Products/ProdDS/353560TI.pdf) as a Johnson decade counter; what type of counter is this?

    In my mind, a decade counter counts from zero to nine:
    0000
    0001
    0010
    0011
    0100
    0101...etc.,

    and a Johnson counter has a special sequence:
    0000
    1000
    1100
    1110
    1111
    0111
    0011
    0001
     
  2. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    A decade counter usually has four flops and ten states. A Johnson counter with five flops has ten states. What is not to like?

    Your four bit Johnson counter only has eight states.

    Unlike a regular binary or decade counter, a Johnson counter counts in a Gray-Code sequence.
     
    Last edited: Dec 13, 2014
  3. Papabravo

    Expert

    Feb 24, 2006
    10,140
    1,789
    It's a five stage Johnson counter with the Q-bar output of the most significant sage fed back to the D-input of the first stage. The trick is that you can't see the output of the counter itself, because there is a decoder that decodes the outputs of the five stage Johnson counter. A five stage Johnson counter will have exactly ten different states. For decoding purposes the Johnson counter is well behaved in that only one bit changes on each clock pulse, which means the decoder cannot have glitches or race conditions.
     
  4. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Implemented that way, a five-bit Johnson counter has a hazard in that if it comes up in certain states, it repeats with a different modulus.
     
  5. nDever

    Thread Starter Active Member

    Jan 13, 2011
    154
    4
    I guess what threw me off was the "decade" modifier. I mean if the counter has five stages, doesn't that imply that there is ten different states? Isn't "five-stage decade" verbose in this case?
     
  6. Papabravo

    Expert

    Feb 24, 2006
    10,140
    1,789
    Well it is true that I did not look at the datasheet diagram in great detail. It is kinda fuzzy. I saw 5 stages, and the feedback and let it go at that.
     
  7. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    No, a five flip-flop state machine actually has 2∧5=32 potential states. For example, a five-bit binary counter can count 0 to 31. A 5 bit Johnson decade (ring) counter is a special case that has only ten states out of the possible 32.

     
  8. nDever

    Thread Starter Active Member

    Jan 13, 2011
    154
    4
    I understand that.
    How is it possible for a 5-bit Johnson counter to have 32 states?
     
  9. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    I didn't say that five flip-flops connected as a Johnson counter would have 32 states; you did.


    I said that five flip-flops can have a maximum possible 32 states. A Johnson counter is one of thousands of possible 5 bit state machines that can have any actual number of states, but never more than 32...

    Actually, even a 5bit Johnson counter can come up randomly in any of the 32 theoretical states at power-up. It is just that after a few clocks, a properly implemented Johnson counter will converge into the familiar ten states used in the 4017, for example.
     
    Last edited: Dec 14, 2014
  10. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    This is how the 10-states Johnson counter is connected in the CD4017 attached.

    4017 schem.PNG

    Allen
     
  11. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Notice the AND and NOR below the Q2 flip-flop in the 4017 schematic. That is the steering logic that causes this state machine to settle into the correct Gray code 10-count sequence in the event that at power-up, the flops come up in some state which is not one of the allowed ten states and the Reset input is not asserted. If the Reset input is asserted immediately after power up, the five flops all go to 00000 which is one of the Gray code states. If the Reset input is never asserted, then it could take several extra clocks for the counter to reach the valid states...
     
Loading...