How to toggle a reset in a counter made up of JK flip flops

counterflipflop

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.

Best Answer

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.