6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon Apr 29, 2024 5:38 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Push button problem
PostPosted: Sun Apr 07, 2024 2:47 am 
Offline

Joined: Tue Apr 02, 2024 7:42 am
Posts: 2
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?


Attachments:
Screenshot 2024-04-07 123833.png
Screenshot 2024-04-07 123833.png [ 15.58 KiB | Viewed 1116 times ]
Screenshot 2024-04-07 123759.png
Screenshot 2024-04-07 123759.png [ 33.58 KiB | Viewed 1116 times ]
Screenshot 2024-04-07 123050.png
Screenshot 2024-04-07 123050.png [ 27.88 KiB | Viewed 1116 times ]
Top
 Profile  
Reply with quote  
 Post subject: Re: Push button problem
PostPosted: Sun Apr 07, 2024 9:41 am 
Offline
User avatar

Joined: Tue Feb 28, 2023 11:39 pm
Posts: 133
Location: Texas
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:

Attachment:
Screenshot 2024-04-07 043725.png
Screenshot 2024-04-07 043725.png [ 10.88 KiB | Viewed 1092 times ]


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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: