Beefer3
New Member
Hello everyone
Has anyone had any experience with using the Pic Basic Pro command "inkey". I have wired the keypad according to the example in the help files with the exception of using port c. When I power my circuit all I get is 16 across my display. When I push a button I get nothing but 16. Here is my code:
device = 16f877a
xtal = 4
declare keypad_port portc
keyin:
DIM VAR1 as BYTE
VAR1 = INKEY ' Scan the keypad
DELAYMS 50 ' Debounce by waiting 50ms
PRINT @VAR1 , " " ' Display the result on the LCD
goto keyin
end
Any help would be appreciated.
Thanks
Has anyone had any experience with using the Pic Basic Pro command "inkey". I have wired the keypad according to the example in the help files with the exception of using port c. When I power my circuit all I get is 16 across my display. When I push a button I get nothing but 16. Here is my code:
device = 16f877a
xtal = 4
declare keypad_port portc
keyin:
DIM VAR1 as BYTE
VAR1 = INKEY ' Scan the keypad
DELAYMS 50 ' Debounce by waiting 50ms
PRINT @VAR1 , " " ' Display the result on the LCD
goto keyin
end
Any help would be appreciated.
Thanks