Keypad and DT's Instant Interrupts


Results 1 to 12 of 12

Threaded View

  1. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    0-3 is 4 bits, so you have to configure to 4 COLUMNs.

    maybe 4 colums and 3 row now?

    on the other hand my comments in the code above are not right... sorry

    for a whole 4X4 keypad it should be
    Code:
        DEFINE KEYPAD_ROW 4 	 ' 4 ROW keypad
        DEFINE KEYPAD_ROW_PORT PORTB ' ROW port = PORTB
        DEFINE KEYPAD_ROW_BIT 4 	 ' ROW0 = PORTB.4
        DEFINE KEYPAD_COL 4 	 ' 4 COL keypad
        DEFINE KEYPAD_COL_PORT PORTB ' COL port = PORTB
        DEFINE KEYPAD_COL_BIT 0 	 ' COL0 = PORTB.0
        DEFINE KEYPAD_DEBOUNCEMS 20  ' debounce delay = 20 mSec
        DEFINE SCAN_ONCE 1
    i have this setup on a EASYPIC4 board and their 4X4 keypad like this


    And using the internal pull-up.

    their keypad schematic is bellow
    http://www.mikroe.com/pdf/keypad_board_schematic.pdf
    Last edited by mister_e; - 26th April 2007 at 20:18.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts