Up/Down Counter Not Counting Down

  • Thread starter Thread starter TheRedDevil18
  • Start date Start date
  • Tags Tags
    Counter Counting
Click For Summary

Discussion Overview

The discussion revolves around the design and functionality of a 2-bit counter using JK flip flops, specifically addressing issues encountered when attempting to implement a counting down feature. Participants explore the circuit design, simulation behavior, and the underlying logic equations.

Discussion Character

  • Homework-related, Technical explanation, Debate/contested

Main Points Raised

  • One participant describes their circuit design and notes that it counts up correctly but fails to count down as expected, starting at 3 and counting to zero before counting up again.
  • Another participant requests the design equations to better understand the circuit's logic.
  • A participant provides a logic equation for the output, indicating that the control input determines whether the counter counts up or down.
  • One participant points out that the JK flip flops are being used as T flip flops, suggesting that this may be affecting the counting behavior.
  • Another participant questions the configuration of the clock inputs, implying that a synchronous design may require different connections.

Areas of Agreement / Disagreement

Participants have not reached a consensus on the cause of the counting issue, and multiple viewpoints regarding the circuit design and functionality remain. There is ongoing exploration of the design equations and the use of flip flops.

Contextual Notes

Limitations include potential misunderstandings of flip flop behavior, the specific configuration of the clock inputs, and the assumptions made regarding the control input's effect on counting direction.

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

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
5
Views
4K
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K