[1][1]I've been trying to make a timer that starts from 0 then counts down at 9 to 0. I've been struggling to make it.  I made state tables and diagrams and for the flipflops, but when implementing to a simulator, it just doesn't give me the output I want.

I've tried making the don't cares (10-15) as 0 but still doesn't work.

Here's the state diagram:

[![enter image description here][2]][2]

Here's the state table:

[![enter image description here][3]][3]

I followed the kmap results in the simulator but still can't get it to work.

Here's my state table for the jk flipflop

[![enter image description here][1]]

kmaps using logic friday:
[![enter image description here][4]][4]

Simulation in proteus, it counts down from 0 to 9 but gets stuck at 3 and 2 going back and forth.

[![enter image description here][5]][5]


I got it working thank you all. a lot of misinputs was present in making the state table.

nest is to make the 2nd digit in this count down I want it to start at 6 not 0, basically 6,5,4,3,2,1,0. I made the flipflop state table and followed the similar process I used in the first digit. 

But when simulating it, it starts at 0,7,6.... I want it to start at 6 How can I do this??



  [1]: https://i.sstatic.net/TOzgP.jpg
  [2]: https://i.sstatic.net/ejU77.jpg
  [3]: https://i.sstatic.net/gCmFG.jpg
  [4]: https://i.sstatic.net/6bQIy.jpg
  [5]: https://i.sstatic.net/r9iXs.png
  [6]: https://i.sstatic.net/jhptw.jpg
  [7]: https://i.sstatic.net/evKDv.png
  [8]: https://i.sstatic.net/LO660.png
  [9]: https://i.sstatic.net/WCj35.png