Up/Down Counter Not Counting Down

In summary, the conversation revolves around building a 2 bit counter using JK flip flops and the issue of the counter starting at 3 and counting up when switched to count down. The design equations for the counter are Y = M'Q + MQ', where Y is the output and M is the control input (switch). The circuit appears to be using the JK flip flops as T flip flops, which change state on every clock cycle. To create a synchronous machine, the clock inputs should only be connected to the clock.
  • #1
TheRedDevil18
408
1

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
  • #2
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?
 
  • #3
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
 
  • #4
Your circuit is using the JK flip flops as T flip flops. Look them up; T flip flops change state on every clock cycle.
 
  • #5
If you want a synchronous machine, wouldn't you want the clock inputs connected only to the clock?
 

1. Why is my up/down counter not counting down?

There could be several reasons for this issue. One possibility is that there is a malfunction in the circuit or coding of the counter. Another possibility is that the counter is not properly reset or initialized. It is important to check the code and connections to ensure everything is functioning correctly.

2. How do I troubleshoot my up/down counter not counting down?

The first step in troubleshooting is to carefully review the code and connections. Check for any errors or missing components. You can also use a multimeter to test the circuit and make sure all connections are working properly. If necessary, you can also try resetting the counter or adjusting the settings.

3. Can a counter only count up or down?

Many counters are designed to count both up and down, but this may depend on the specific model and its capabilities. Some counters may only count up or only count down, so it is important to check the specifications of your counter to determine its capabilities.

4. How do I make my counter count down instead of up?

To make your counter count down, you may need to adjust the code or settings. This may involve changing the direction of the count or setting the counter to count in reverse. You may also need to reset the counter or adjust the initial value to start counting down from.

5. Can I use an up/down counter for any type of project?

Up/down counters can be used for a variety of projects, but it is important to make sure it is the right type of counter for your specific project. Some counters may have limitations or may not be suitable for certain applications. It is also important to make sure the counter has the necessary features and capabilities for your project.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
4K
Replies
10
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
Back
Top