-
Reading keypad problem
I am new to PicbasicPro programing and i need some help reading keypad connected to a 16f876 uC. I have managed to display the keys pressed on a standard 16x2 LCD display, but now i don`t know how to store the whole string of numbers entered in a variable, so it could represent a number of rotations for a stepper motor. For example if i enter 5 5 5 it should somehow be stored in a variable "rotations" as 555. I saw a similar question asked before on this forum, but was left unanswered.
I know it seems like a trivial question, but it`s frustrating me.
Thanx in advance.
-
Hello PostAR,
Do a search for "Keypad Entry?" by Tonigalea dated 7Aug04. Look at the response to his post by Ms. Melanie. I think this will handle your situation.
BobK.
-
Hi Bob.
Of course!
if x = 5 then
bigword= NUM[1]*1000 + (NUM[2]*100) +(NUM[3]*10)+(NUM[4]*1)
This will make a number from my digits. Piece of cake! But i guess it`s allways easy once they show you how :) Thanx again.