Problems with button input
I am working on a simple clock for the SX and I am having problem with button inputs. In simple terms, the program is much to fast to register a 'human speed' button push as one button push. Is there some way I can implement a 'one shot' into my design without an external chip? I need the circuit to be as small as possible, so avoiding extra chips would be preferable.
I attached my code so you can see whats going on...
Thanks,
Dan
I attached my code so you can see whats going on...
Thanks,
Dan
Comments
· You just need to wait until the button is released before continuing. Something like:
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
“The United States is a nation of laws -· poorly written and randomly enforced.” - Frank Zappa
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
If you move your display updating into the ISR then you won't have any problems there. You can find examples of this in the help file and in my January Nuts & Volts column (download from Parallax).
http://www.parallax.com/dl/docs/cols/nv/vol8/col/nv141.pdf
Post Edited (JonnyMac) : 6/5/2007 2:37:56 PM GMT
Thanks for the code snippets; I implemented them and they work perfectly.
Thanks for all the help. I will let you know tomorrow how the test went.
-Dan