Up/Down Counter Not Counting Down

  • Thread starter Thread starter TheRedDevil18
  • Start date Start date
  • Tags Tags
    Counter Counting
AI Thread Summary
The discussion revolves around a 2-bit counter using JK flip flops that fails to count down correctly. When set to count down, it starts at 3, goes to zero, and then counts up again. The circuit is designed to switch counting direction based on a control input, with the clock connected to a 555 timer. A suggestion is made to verify the design equations and consider that the JK flip flops are being used as T flip flops, which change state with each clock cycle. The conversation emphasizes the need for proper clock input connections for synchronous operation.
TheRedDevil18
Messages
406
Reaction score
2

Homework Statement


I'm trying to build a 2 bit counter using JK flip flops. In the simulation it counts up just fine, but when I switch it to count down, it starts at 3 and then goes to zero and counts up again.

Homework Equations

The Attempt at a Solution


[/B]
Here is my circuit diagram:
upload_2016-8-27_22-3-42.png


When the switch is closed it should count down, and when it's open, it should count up. The clock is connected to a 555 timer, just didnt show it.
 
Physics news on Phys.org
TheRedDevil18 said:

Homework Statement


I'm trying to build a 2 bit counter using JK flip flops. In the simulation it counts up just fine, but when I switch it to count down, it starts at 3 and then goes to zero and counts up again.

Homework Equations

The Attempt at a Solution


[/B]
Here is my circuit diagram:
View attachment 105174

When the switch is closed it should count down, and when it's open, it should count up. The clock is connected to a 555 timer, just didnt show it.
I'll look more at this, but could you post your design equations?
 
berkeman said:
I'll look more at this, but could you post your design equations?

Y = M'Q + MQ'

Where Y is the output, those AND and OR gates.
M is the control input (switch), it counts down if M = 1 (closed switch) and up if M = 0 (open switch)

And the flip flop in the simulation is a 74HC112
 
Your circuit is using the JK flip flops as T flip flops. Look them up; T flip flops change state on every clock cycle.
 
If you want a synchronous machine, wouldn't you want the clock inputs connected only to the clock?
 

Similar threads

Back
Top