??? 09/05/04 18:14 Read: times |
#76928 - RE: debouncing for matrix keypad ? Responding to: ???'s previous message |
Now if I just set scanning rate to 50 ms without debouncing the results will be the same as I explained it earlier to our friend prahlad.
Hi Reza, Even if you increase your keyboard scanning rate to 50ms there are chances of a key getting read incorrectly. However chances of reading a key correctly will get increased. Since most of the keystrokes pressed during the period will get debounced. For instance if your new key has a bounce time of 5ms then all keystrokes pressed in between 0ms to 45ms will be recognised correctly. But what about keys hit in between that 45.001ms to 49.999ms period. The key is still bouncing when your routine reads it. It can lead to trouble. Can cause accidents if you are using your system in an industrial automation application or some medical application etc. I would suggest you to use a proper debouncing of atleast 50ms [ I am a bit paranoid I use 100ms debouncing period on my keypads ]. If you want to continue using your keyboard scanning routine then before recognising a key press make sure that the key had same state for atleast two routine calls. Regards, Prahlad Purohit |