# Why is it when I set up a Johnson counter, the number sequence rotates fine, but I can't get a ring counter right (explanation below)?

With a Johnson counter, I hook up every flip flop's Q output to the following flip flop's D input, for D flip flops. And then the final Q' output is hooked into the first flip flop's D input. When I simulate this in Multisim, it runs through the numbers fine:

1000
1100
1110
1111
0111
0011
0001
0000
and rotate...


Setting up a Ring counter doesn't seem to work though. From what I understand, it's the same thing, except the last Q' output is left alone, and instead the last Q output is hooked to the first D input. When I do this, though, none of the LED lights turn on.

A ring counter is supposed to do this:

1000
0100
0010
0001
and rotate...


I am baffled, so any help or pointers would be great. I google'd this and couldn't find anything.

UPDATE:

Okay, I added an interactive digital constant that goes to the set for the first flip flop. When I run it, I set it to 1, then immediately set it to 0, and then it rotates through the numbers just fine for a Ring counter. However, I'd like it to do that automatically without having to do that. How can I have the first flip flop initially set to 1 without having to do all that?

Is there any reason why you do not want to start your loop in a known configuration before each run? Generally for logic design, you want to have a clear startup sequence. Otherwise you are leaving the operation of your circuit to whatever ambient conditions exist at power on which can be dangerous.

Perhaps you could feed the output of your array to a comparator at startup and see whether the output/input is high/low. Then based on that you could keep clocking your ring counter until the output is as expected? You could then disconnect the comparator via relay. Could you elaborate on what your interactive digital constant actually is? Thanks.

On startup, R1C1 sets U1 and clears U2, U3, and U4, initializing the ring counter with U1Q high and all the other Qs low.

There are two ways to do what you want, assuming that you're OK with a 1000, 0100, 0010, etc sequence.

The first way is to build in a power on reset circuit like the one proposed by EM Fields, although the exact implementation needs to be slightly more sophisticated than what he shows if you want reliable operation in a real circuit.

The other way is to build the pattern generation into feedback logic, like this

simulate this circuit – Schematic created using CircuitLab

Two things to note:

1) Although there are only 3 flip-flops, the total cycle time is 4 clock cycles.

2) On power up, the state of the 3 flip-flops is (for this implementation) undetermined, so the output for the first 3 clock cycles can be anything.