I am writing a test program to learn how to write text and variable values to a serial LCD Screen, I am using melabs 20 character by 4 line serial lcd screen connected to PORTC.0 on the lab X-1 board. I was told that writing to a serial LCD is much like writing to a normal LCD, with the exception of using the SEROUT command instead of LCDOUT. But, when I try this, it says the line of code is a bad expression, it will work if I remove "DEC3" from the SEROUT command, but then it outputs the variable value as ASCII characters, instead of a numeric value. This is what I have so far:
INCLUDE "modedefs.bas" 'Include mode definitions
X VAR BYTE 'Declare x as a variable
X=1 'Set X to 1
LOOP: 'Beginning of main loop
X=X+1 'Add 1 to x
PAUSE 500 'Wait 500ms
SEROUT PORTC.0, N9600, [$fe, $1] 'Clear SLCD screen and move
'cursor to beginning
SEROUT PORTC.0, N9600, ["X=",DEC3 X] 'Display value of X
GOTO LOOP 'Do it all over
END
Thank you for your time,
Matthew
Bookmarks