Hi Al
How are you ?
I am experimenting with your code snippet .. here's what I have so far.
As i try to compile I encounter an error hereCode:'keypad variables for array keypress capture begin here Retain var byte Ret_Char var byte [10] Ret_Count var byte Ret_Prnt var byte Ret_Clst var byte Ret_Prnt = "#" Ret_Clst = "*" 'keypad capture code begins here Ret_Char[Ret_Count]=datatx ' here you transfer the char of the key pressed If Retain = 0 then ' Retain is a flag then if set will do your job For A0 = 1 to Ret_count -1 Serout portc.6,T2400,baud,[Ret_Char [A0]] NEXT A0 lcdout datatx 'display the variable on the LCD pause 1000 lcdout $fe,1 'clear lcd screen else If Ret_Char[Ret_Count] = Ret_Clst then ' if key = "*" then step-back counter Ret_Count = Ret_Count - 1 goto Clear_Count endif If Ret_Char[Ret_Count] = Ret_Prnt then ' if key = "#" then send string For A0 = 1 to Ret_count -1 Serout portc.6,T2400,[Ret_Char [A0]] NEXT A0 lcdout datatx 'display the variable on the LCD pause 1000 lcdout $fe,1 'clear lcd screen RetCount = 0 goto Clear_Count endif Ret_Count = Ret_Count + 1 Clear_Count: endif goto start
For A0 = 1 to Ret_count -1
Not quite sure why ?
Do you think I could attain the same thing with either a case select statement or a do...while loop ?
So if I were using a do ... while (or while wend) for example
do
keep allowing keypress
While
key_press_variable is not equal to '#" 'until we see #
then serout
Kind regards
Dennis




Bookmarks