??? 09/05/04 18:46 Read: times |
#76929 - RE: debouncing for matrix keypad ? Responding to: ???'s previous message |
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 Correct prahlad the key may be in bouncing state when it is read by the routine but I say it is even more accurate to not use debouncing than using it(please consider I’m talking about ordinary applications there may be some applications that output from microswitch should remain stable before proceeding further). why ? Here is why, because when I use debouncing a pressed key will never be reported to the program before debouncing time which is for example 30 ms that’s the wrong report because as I said key has been pressed at least 30 ms earlier(may be near 60 ms). But as I said earlier if keypad scanning routine reads a pin low while micro switch is still bouncing then it reports it nearly on time to the program in other cases it is never worse than when I use debouncing, in other words in all other cases it is not reported to program later than 30 ms when next scan takes place so it is never worse than when I use debouncing but sometimes it is even more accurate (more on time). best regards |