I'm trying to make a counter that counts: 0,1,2,3,4,5

I need this for a frequency divider of 6

So I made this table:

enter image description here

From this I get:

J0= 1

K0= 1

J1 = NOT Q0 AND Q1

K1 = Q1

J2 = Q1 AND Q2

K2 = Q1

I made the circuit in the software:

enter image description here

It does compile with 1 warning:

enter image description here

And when simulating only the first jkff is working:

enter image description here

Thank you


Suppose the output of FF 64 is 0. Then the output of AND2 must be 0, no matter the other input value.

Now the J input of FF 64 is 0. With J at 0, the output can never become 1.

Your logic for J1 is not implementing line 2 of your transition table correctly.

  • \$\begingroup\$ You mean the equation for J1 is not ok?I checked multiple time and it should be ok.... \$\endgroup\$ – Fox Alex Dec 31 '18 at 20:25
  • \$\begingroup\$ @FoxAlex, Your transition table says J1 should be 1 for Q[2:0] = 001. Your logic gives an output of 0 for this input. \$\endgroup\$ – The Photon Dec 31 '18 at 20:31
  • \$\begingroup\$ You are right, but why?I used this to calculate the equations and also done by hand and it should be good imgur.com/a/utDY3mB @ThePhoton \$\endgroup\$ – Fox Alex Dec 31 '18 at 20:41
  • \$\begingroup\$ @FoxAlex, I don't know how you mapped Q[2:0] to A, B, and C in the K-map, but it looks like you put a 0 in the 001 location instead of a 1, and you put the 1 in the 010 location. \$\endgroup\$ – The Photon Dec 31 '18 at 20:48
  • \$\begingroup\$ You are right, I didn't put the values in the right order in the map, can't believe, I looked at it so many times, thank you. \$\endgroup\$ – Fox Alex Dec 31 '18 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.