News

Use A Momentary Or Tactile Switch As A Pushbutton Switch

You could have to refer back to the pinout on the previous page when making your connections to the J-K flip-flop. The big picture we’re working with is that we’re going to make use of the state saving feature of the flip-flop together with its ability to easily toggle an output to push 5V and around 6mA to 24mA (each flip-flop IC has varying characteristics so ensure you take a look at yours). The one I am using currently has an Io of ~ 10mA. We will drive an LED with the Q’s ~ 5V output and sink Vcc with !Q, Q’s complement. In other words, when Q is HIGH, !Q is LOW and vice versa.

You’ll recall that the J-K input to toggle the current state is to have both inputs driven HIGH so I’ve tied the J and K input to a 10k pullup resistor to Vcc (5V). The set (!SD) and reset/clear (!RD) are sometimes both active LOW, but on this IC they are active HIGH so I’ve tied them to a pulldown to GND.

So if both inputs are permanently tied to 5V, how can we input anything? Remember the clock signal? The Q and !Q outputs are available one setup clock after a positive transition from the rising edge of the clock signal. All we should do is connect our momentary switch from 5V into the clock signal and after we press the switch and close the connection, we will send a positive edge-trigger to the flip-flop which will have it toggle the output. So, If the Q output is HIGH (ie it’s sourcing 5V to the LED) when we press the button again, it would go to LOW (ie off) and when we press it again next it’ll toggle back to HIGH (on) and so on.

Ensure you look at the picture of the schematic (you don’t have to have Eagle and look on the *actual* schematic…there’s a picture of it below) if you’re unclear about anything. Also, you will notice I’ve included a 2-input terminal block to permit the board to simply accept a 5V and a GND signal.

And that’s it. Now your nifty momentary/tactile switch is a push-and-stay-on pushbutton switch.

Be the First to comment.

Leave a Comment

Your email address will not be published. Required fields are marked *