Quote Originally Posted by Pic_User View Post
Hi savnik,
You want the user to be able to press a series of buttons, on your keypad. You would like the PIC to take this series of separate button values and “string them together” (“concatenate” them). Then use them as a PIC WORD variable in your program.
You are able to read the individual button presses, but are having trouble putting them together to make the variable.
Is that close?
-Adam-
Ok, well that makes a bit more sense to me...

getword:
for x = 0 to 3
Gosub getkey ' Get a key from the keypad
keyin(x) = key 'save the individual keypresses
lcdout I,Line2 + x,#key ' Display ASCII key number
next
outval = ( keyin(0) * 1000 ) + ( keyin(1) * 100 ) + ( keyin(2) * 10 ) + keyin(3)
return