Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/04/01 15:16
Read: times


 
#7747 - RE: Keypad interfacing revisited...
They best way to scan a keypad is with a background interrupt polling routine to scan a keypad matrix.

By setting the period for this interrupt to scan the keypad, you remove all chance of an event triggered interrupt loading down the microprocessor, particularly if the switch is noisey.

I just use a scheduled task that fires every 10ms. Since the debounce guard time is commonly suggested to be about 60ms, this works fine for me. Opinions will differ.

The background tasker launches the keypad routine every 10ms. If their is no action it returns to the tasker. If there is a new keypress detected, it loads a processing string for subsequent entry into the keypad routine. If the thread is already loaded (ie its already working on a keypad, debouncing it etc) then the next step is run via the thread vector.

For a simple keypad matrix, you may only require external cheapo diodes on half the matrix side.

Except for the software refinements, this is the way we did it at Tandy Electronic Design and no one squeezed more cost out of a design than Tandy in the 80's. :)

aka j

List of 17 messages in thread
TopicAuthorDate
Keypad interfacing revisited...            01/01/70 00:00      
RE: Keypad interfacing revisited...            01/01/70 00:00      
RE: Keypad interfacing revisited...            01/01/70 00:00      
RE: Keypad interfacing revisited...            01/01/70 00:00      
RE: Keypad interfacing revisited...            01/01/70 00:00      
RE: Keypad interfacing revisited...            01/01/70 00:00      
RE: Keypad interfacing revisited...            01/01/70 00:00      
RE: Keypad interfacing revisited...            01/01/70 00:00      
RE: Keypad interfacing revisited...            01/01/70 00:00      
RE: Keypad interfacing revisited...            01/01/70 00:00      
RE: Keypad interfacing revisited...            01/01/70 00:00      
RE: Keypad interfacing revisited...            01/01/70 00:00      
RE: Keypad interfacing revisited...            01/01/70 00:00      
RE: Keypad interfacing revisited...            01/01/70 00:00      
RE: Keypad interfacing revisited...            01/01/70 00:00      
RE: Keypad interfacing revisited...            01/01/70 00:00      
RE: Keypad intrfaced with 8052 software            01/01/70 00:00      

Back to Subject List