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
i have this setup on a EASYPIC4 board and their 4X4 keypad like thisCode: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
And using the internal pull-up.
their keypad schematic is bellow
http://www.mikroe.com/pdf/keypad_board_schematic.pdf







Bookmarks