I am building a circuit for a stop watch interface.
When I click the push button 'Star / Stop", the LED "Clock Started" should light up.
It is happening in my case but after a delay and I have to hold the push button down for a long time.
When I click the "Start / Stop" again the LED should shut down instantly instead of me holding the push button for a long time. (2-3 seconds)
The following is inside the "start" subcircuit.
How do I get rid of this delay?
Push button problem
Re: Push button problem
The issue is that you have your push being effectively gated by your clock, so you have to hold the button until the next clock pulse.
In the case of Logisim you don't really need to do all of that as the button is already "debounced" so the following will work just fine:
In the real world though you'd want to debounce the button so that you get one clean pulse instead of lots of noisy little pulses from the mechanics bouncing and scraping against each other.
In the case of the JK circuit above this would happen with the clock pulse filtering out the noise; and as such the clock in a real circuit would likely be running much faster than you can perceive, however, in Logisim everything is slowed way down so you can see the circuit actually running.
In the case of Logisim you don't really need to do all of that as the button is already "debounced" so the following will work just fine:
In the real world though you'd want to debounce the button so that you get one clean pulse instead of lots of noisy little pulses from the mechanics bouncing and scraping against each other.
In the case of the JK circuit above this would happen with the clock pulse filtering out the noise; and as such the clock in a real circuit would likely be running much faster than you can perceive, however, in Logisim everything is slowed way down so you can see the circuit actually running.