Weired results with Serial_Lcd
OK, I'm stumped. I just got my First propeller today and I'm slowly grasping the propeller language. But when I try to link to a Parallax 4x20 serial lcd, using the Serial_LCD Object from the Object Exchange, I get weird results. Text doesn't show up as expected. Well here's the simple test code I'm try to use.
The display seems to respond to function commands. But, the text never shows up in the right place. Its shifted off the left egde when it actualy shows up and isn't Smile.
CON
_CLKMODE = XTAL1 + PLL16X
_XINFREQ = 5_000_000
OBJ
LCD : "Serial_Lcd"
PUB main
WAITCNT(clkfreq / 10 + cnt)
LCD.init(9,9600,4)
LCD.cursor(1)
LCD.cls
LCD.backLight(true)
LCD.str(str1)
waitcnt(clkfreq * 5 + cnt)
DAT
str1 byte "Proto Prop Rocks",13,0
The display seems to respond to function commands. But, the text never shows up in the right place. Its shifted off the left egde when it actualy shows up and isn't Smile.

Comments
you have to call the command LCD.str like this
the "@" in this use is called the adress-operator
If you get strange results from something it's always worth a look into the definition of the code
the method str in the file serial_Lcd.spin
"strAdr means string ADRESS (=location in memory where the string is stored)
to narrow down problems like this
try variations like this
PUB main WAITCNT(clkfreq / 10 + cnt) LCD.init(9,9600,4) LCD.cursor(1) LCD.cls LCD.backLight(true) LCD.putc("T") LCD.putc("e") LCD.putc("s") LCD.putc("t") waitcnt(clkfreq * 5 + cnt)or
PUB main WAITCNT(clkfreq / 10 + cnt) LCD.init(9,9600,4) LCD.cursor(1) LCD.cls LCD.backLight(true) LCD.str(string("Hello World")) waitcnt(clkfreq * 5 + cnt)best regards
Stefan