1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Up/Down Counter Not Counting Down

  1. Aug 27, 2016 #1
    1. The problem statement, all variables and given/known data
    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.

    2. Relevant equations

    3. The attempt at a solution

    Here is my circuit diagram:

    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.
  2. jcsd
  3. Aug 27, 2016 #2


    User Avatar

    Staff: Mentor

    I'll look more at this, but could you post your design equations?
  4. Aug 28, 2016 #3
    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
  5. Sep 7, 2016 #4


    User Avatar
    Science Advisor

    Your circuit is using the JK flip flops as T flip flops. Look them up; T flip flops change state on every clock cycle.
  6. Sep 10, 2016 #5


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    If you want a synchronous machine, wouldn't you want the clock inputs connected only to the clock?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted