4row x 10 col keyboard
Archiver
Posts: 46,084
Hello,
Can somebody give me an idea (or a piece of code) of how to scan a 4 row
x 10 col. keyboard. Row 1 to Row 4 are in Pin8 to Pin11. Cols form 1 to 4 are in
Pin12 to Pin15. And Cols from 5 to 10 are in Pin0 to Pin5. With debounce but no
autorepeat (you need to release the key and press it again).
Thank you very much in advance.
Ezequiel
[noparse][[/noparse]Non-text portions of this message have been removed]
Can somebody give me an idea (or a piece of code) of how to scan a 4 row
x 10 col. keyboard. Row 1 to Row 4 are in Pin8 to Pin11. Cols form 1 to 4 are in
Pin12 to Pin15. And Cols from 5 to 10 are in Pin0 to Pin5. With debounce but no
autorepeat (you need to release the key and press it again).
Thank you very much in advance.
Ezequiel
[noparse][[/noparse]Non-text portions of this message have been removed]
Comments
> Can somebody give me an idea (or a piece of code) of how to
>scan a 4 row x 10 col. keyboard. Row 1 to Row 4 are in Pin8 to
>Pin11. Cols form 1 to 4 are in Pin12 to Pin15. And Cols from 5 to 10
>are in Pin0 to Pin5. With debounce but no autorepeat (you need to
>release the key and press it again).
>
> Thank you very much in advance.
>
>Ezequiel
This URL:
http://www.emesystems.com/BS2fsm.htm#keypad
shows a keypad scanning & debounce routine implemented as a state
machine and vertical counters. A vertical counter is one that has
the bits of the count located in different words instead of in the
same word. The code is for a 4x4 keypad, so each state and past
state uses 16 bits, one word. You will need 40 bits each state, so
it will use a lot of the Stamp's RAM.
-- Tracy