# Question About Arbitrary Sequence Counter and Changing the Sequence

hope you are all well. I have an homework which wants from me something like this:

    Design a counter that counts 0 4 6 8 12 14 0... (mod6) and when to counter shows 14 it is going to stop and wait
for 3 minutes. After 3 minutes counter is going to count 0 1 2 3 4.... 14 15 0 ...
There is going to be 6.667 seconds between every count. (You need to use JK Flip Flops to do so.)


So far I tried to find what each J and K input of the Flip Flops should be in order to achieve the sequence. I made table which looks something like this below:

I only wrote 6 rows because I am tasked to show only 6 numbers. Q' represents the configuration of Q outputs for numbers 0 4 6 8 12 14. J(0:3) and K(0:3) represents the configuration of the J and K inputs to change the corresponding Q outputs in each state.

I then drew Karnaugh Maps to find the equivalent logic expressions for the J and K inputs. Here are what I have come up with:

J3 = Q2 + Q1.Q0
K3 = 1
J2 = Q1'.Q0 + Q1.Q0'
K2 = 0
J1 = Q2.Q0
K1 = Q0
J0 = 0
K0 = 1


Then I designed the circuit. The fact that J0 = 0 made me sceptic about the functionality of my circuit; however I still gave it a chance (I checked my table and my Karnaugh maps twice, if I haven't overlooked any detail the tablo and Karnaugh's must be correct.) I simulated my circuit but counter does not increases, it is stuck at 0. I believe that it is because of the jact that J0 is 0. But this is what I found with the calculations I done. Is there some point I am missing? Or should I try a different approach?

And I want to ask something more. I am assuming I completed this part. What I should I do next to change the sequence of the counter back to normal (0-1-2-3-4)?

• I've provided countless (well, not really) examples here: 1, 3, 0, 2, 7 Counter, decade down counter that on reset starts at 9, and Up/Down Mod 10 Counter are just a few such. The example where the decade counter starts at 9 provides a way to always reset to any given starting point you want. (I can't say I entirely understand your table, yet.)
– jonk
May 25 '20 at 18:30
• I will inspect the links you provided thank you so much. By the way I edited the explanation of my table. Hope it helps, sorry for the confusion. May 25 '20 at 18:56
• So, you want to have an "input" that controls whether this is a "0 4 6 8 12 14" or a simple "mod 6" counter? Is that the reason for the two left-most grouped columns in your table?
– jonk
May 25 '20 at 18:58