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:
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
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:
I'm not familiar with PIC BASIC Pro, but do you have pull-up resistors on your input lines?. PortB has them internally (and selectable in the software), with PortC you would need to add external ones.
Hey Nigel, yes I have pull ups on port c. It's funny you responded, I am trying to use your code (tutorial 9) right now!!! I have to rearrange my board but hopefully it will work.
Hey Nigel, yes I have pull ups on port c. It's funny you responded, I am trying to use your code (tutorial 9) right now!!! I have to rearrange my board but hopefully it will work.