Ok .. a 4 line display has different addresses for the lines, as documented in the LCD_16x2...spin. I think MOVE has to be changed, as the address calculation really works for 2 lines only.
if y>2 you need to subtract 2 from y befor using it to calculate adr and after calculation of adr add $14 to adr.
There is a 20x4 spin code example in the obex. Search for LCD. I'd quote the exact lines you need to change but for some reason I can't seem to log into the obex to download it (even though I'm logged in here). Maybe the obex needs a different login/password now?
Anyway, going from 16x2 to 20x2 is just a matter of writing 4 more characters. Going from 20x2 to 20x4 adds two different lines to write to. Sing out if you can't find it. If you have your working code check the line number addresses and add two more. This is an excerpt from some working code I have so you can see the line numbers:
PUB Redraw ' redraw the entire screen
Inst:=128 ' line 1
Send_Inst
LineNumber:=1 ' print line 1
Printline
Inst:=192 ' line 2
Send_Inst
LineNumber:=2 ' print line 2
Printline
Inst:=148 ' line 3
Send_Inst
LineNumber:=3 ' print line 3
Printline
Inst:=212 ' line 4
Send_Inst
LineNumber:=4 ' print line 4
Printline
Inst:=212 ' cursor to beginning of line 4
Send_Inst
CursorOn
Comments
What else do you expect?
if y>2 you need to subtract 2 from y befor using it to calculate adr and after calculation of adr add $14 to adr.
Anyway, going from 16x2 to 20x2 is just a matter of writing 4 more characters. Going from 20x2 to 20x4 adds two different lines to write to. Sing out if you can't find it. If you have your working code check the line number addresses and add two more. This is an excerpt from some working code I have so you can see the line numbers:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
Post Edited (Dr_Acula) : 2/24/2010 11:49:38 PM GMT