DM42 available for order!!!
|
12-22-2017, 08:16 PM
Post: #29
|
|||
|
|||
RE: DM42 available for order!!!
(12-22-2017 07:17 PM)Jeff O. Wrote: For de-bouncing, isn’t the issue, from the keyboard handler’s perspective, “hey, I just detected a key press and release, how long should I wait before accepting another press of the same key as an intentional second press of that key?” That is the correct algorithm to detect a proper key register. As soon as a ON key is detected by the software routine, it must register it and enter a waiting cycle using a counter for at least, say a 100mS, before listening again to new key presses (the keyboard routine can use a basic poll scanning method, or else a more sophisticated hardware interrupt handler). In this way, the multiple successive ON-OFF-ON impulses resulting from pressing a key, no matter how good is the key or how hard you press it, will be interpreted as a single key press. Of course this bouncing issue will be worse on lower quality keyboards (easily oxidizable metal contacts requiring more mechanical pressure to minimize the ON-OFF-ON train pulses), but as far as I know, it is impossible to eliminate it at the hardware level alone. A proper debouching routine must handle it correctly, even if it takes a longer waiting cycle, like 200mS or even 300mS, to make sure that, at very least, each key registers only once when pressed. Jose Mesquita RadioMuseum.org member |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 18 Guest(s)