Shop OBEX P1 Docs P2 Docs Learn Events
4row x 10 col keyboard — Parallax Forums

4row x 10 col keyboard

ArchiverArchiver Posts: 46,084
edited 2002-09-20 04:21 in General Discussion
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]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-09-20 04:21
    >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


    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
Sign In or Register to comment.