Manual UP/DOWN counter help

cmartinez

Joined Jan 17, 2007
8,302
Thank you, its working.. Kind of... The signal of counter is too long comparing with push button.. When push button comes back to its original possition in this case open, signal of counter is still active and XOR creates double signal.. Instead of 9 (when counting down from 10) im getting 8.
Either you're generating two rising pulses, or you need to debounce the pushbutton... I'm not familiar with the sim software that you're using
 

Thread Starter

Aras

Joined Dec 7, 2014
10
Could you post an image of your latest design so I can take a look?
It okay, i have done it :) i used AND gates and it works perfectly. Thank you for your time and help, you helped me a lot :)
Although talking about debounce. Its not really necessary for scheme to work, but i want to know about it more. I made debounce (or i think so that i did but i didnt include it to scheme) but that didnt change anything.
 

Attachments

cmartinez

Joined Jan 17, 2007
8,302
Although talking about debounce. Its not really necessary for scheme to work, but i want to know about it more.
I doubt your software is capable of simulating analog signals. But if you want to learn about debouncing a push button, I suggest you google it. It's not that complicated. The point is that you want to get rid of the voltage spikes that might be caused due to imperfections in the button's contacts and its mechanical motion, so as to avoid sending more than one signal to the circuit when you press it.

There are a few ways of debouncing a push button.

RC circuit:
debounce.jpg

Logic gates:
xD0MS.jpg


Or even software programmed in an MCU...

But remember that the most important part of your work is to always have fun with it ;)
 
Top