Using the link i provided and using MPASM to compile you need...
Code:
INCLUDE "KeyPad.bas"
DEFINE KEYPAD_ROW 4 ' 4 ROW keypad
DEFINE KEYPAD_ROW_PORT PORTB ' ROW port = PORTB
DEFINE KEYPAD_ROW_BIT 3 ' ROW0 = PORTB.3
DEFINE KEYPAD_COL 3 ' 3 COL keypad
DEFINE KEYPAD_COL_PORT PORTB ' COL port = PORTB
DEFINE KEYPAD_COL_BIT 0 ' COL0 = PORTB.0
YourVar var byte
Start:
@ READKEYPAD _YourVar
' plah plah
' plah plah
' plah plah
'
and your keypad results will be stor in YourVar variable as follow
Code:
col0 col1 col2
1 2 3 row0
4 5 6 row1
7 8 9 row2
10 11 12 row3
Last edited by mister_e; - 31st May 2006 at 00:20.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks