PDA

View Full Version : Trouble with Lcdout



Tomexx
- 20th November 2004, 05:42
Hi,
I have a keypad and an LCD.
My keypad's scanning rutine returns a key (0 to 9).
I'd like to display each digit (as I press the key on the keypad) next to the previous one.

For example:
After pressing digit 3 the LCD will read: 3
Then I press digit 6, the LCD now reads 36
then I press digit 4, the LCD now reads 364 and so on


For some reason I can't do that. I've only been able to display one digit at a time by clearing the display first:



Lcdout $FE, 1, #key


but I really want to show them together as they're being pressed.

Please help

Melanie
- 20th November 2004, 16:44
You've done pretty much OK... just rearrange things a little...


Start:
LCDOut $FE,1
KeyLoop:
Gosub GetKey
LCDOut #key
Goto KeyLoop

Tomexx
- 20th November 2004, 19:36
Thanks Melanie.

I didn't know that you could skip the "$FE" command when sending data using Lcdout.

BTW, do you have a complete list of LCD commands for use with Lcdout? (I only have the ones from PBP manual and Google couldn't help me).

Tom

mister_e
- 20th November 2004, 22:11
all the special command to use with LCDOUT are in the PBP manual.

$fe,1 clear display
$fe,$c0 jump to 2nd line
etc

so LCDOUT $FE,1," hello "

will clear the display an write hello

LCDOUT $FE,1,"line 1",$FE,$C0,"line 2"

will clear the display and write line 1 on the first line, line 2 on the second line of your LCD.