0
\$\begingroup\$

I have been playing around with a small circuit which at the moment consists only of a counter made up of 3 JK flip flops. Like so:

Counter

What I want to add is a reset input pin that will set the 3 LEDs to 0/off but I am not sure how to implement. I know that you need to input a 0 for the J and a 1 for the K to trigger the reset behaviour but this is what I am struggling with.

Any ideas would be very appreciated.

\$\endgroup\$
1
  • \$\begingroup\$ Real JK flip-flops usually have a dedicated asynchronous reset pin for just that purpose. The different J-K states only take effect with a clock pulse, so this wouldn't usually be considered a reset. \$\endgroup\$
    – brhans
    Commented Oct 27, 2014 at 20:44

1 Answer 1

1
\$\begingroup\$

Brhans' comment is correct, most JK flip-flops have either Reset inputs or both Reset and Set inputs. Interestingly, the JK flip-fl;ops provided in the CircuitLab editor don't have Resets either.

The following circuit should do what you need:

enter image description here

Right-click and select View Image for a large picture.

It took a fair amount of logic (three pairs of AND/OR gates) to steer the clock from its counting configuration to the one needed to reset the flip-flops. For testing, I used a 1 Hz clock.

The K inputs are always at 1 (+5v), the J inputs are 1 or 0 (ground) depending on the state of the reset pushbutton. When it is not depressed, the line going to the J inputs is pulled high by the 4K resistor.

I am showing just a simple switch for the reset, which is not debounced; in a real circuit this would probably be a logic output from some other part of the cuircuit.

The three NOT gates are to provide a short delay (ns) so the J lead is pulled to 0 before the clock goes from 1 to 0, clocking the flip-flops.

I simulated this in CircuitLab and it seems to work well.

\$\endgroup\$

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.