How would I go about making a push button to act as a toggle switch. A switch would just stay in the active state until "un-switched". I need my button to toggle something.
Example:
Button down (active) -> output active
Button up (not active) -> output active
Button down (active) -> output not active
Button up (not active) -> output not active
It should'nt matter how long the button is pressed for, it should only be able to deactivate once the button has been released once.
Currently I'm using a PROM to check for all these states but I feel like there should be an easier way, perhaps with a T-flip-flop, but if you hold the button for more than one clock pulse it messes up.