0
\$\begingroup\$

how can I prevent a counter based on JK-FF (up-counter, up/down-counter) from jumping back to zero after it reached the maximum.

For Up-Counter: It should count up until it reaches maximum and stay there until I reset the JKFF.

For Up/Down-Counter It should count up until it reaches maximum and stay there until I reset the JKFF. It should count down until it reaches minimum and stay there until I reset the JKFF.

Thanks for your help!

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

Disable the counter when the max is reached. You can do that by passing the clock through a AND gate down to the clock input. The other input is the internal state based enable which you create with an n-input AND gate for detecting max and a n-input NOR gate for min.

When clamping you add the (possibly inverted) direction input pin to the and gates:

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
1
  • \$\begingroup\$ Insertion of some gates into the clk line is not good. Better is use an enable input on the Counter \$\endgroup\$
    – Roman
    Apr 5, 2017 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.