I've got a mystery with the 'debug' command!
Admittedly, I'm not using a "standard issue" serial LCD display but I still can't fathom what's happening here. It is a serial LCD with the same basic dispaly module as the standard issue one.
This code (the part between init and main just initializes the display)....
.... displays a letter 'A' at the top of the LCD as expected:
But, if the debug command is moved to 'Position 2'.......
.... the cursor-positioning command to the LCD (ac80) is ignored after the first time round the loop and gets printed as data instead:
The mystery (to me anyway!) is what is the debug command doing positioned after the hserout that it doesn't do before it and why is it affecting hserout anyway?
John.
Admittedly, I'm not using a "standard issue" serial LCD display but I still can't fathom what's happening here. It is a serial LCD with the same basic dispaly module as the standard issue one.
This code (the part between init and main just initializes the display)....
Code:
init:
hsersetup B9600_4, %10000 ;Use LCD Pin 1, no hserin
hserout 0, (13) : pause 100 ;Initialize LCD
hserout 0, (13) : pause 100
hserout 0, (13) : pause 100
pause 500
hserout 0, ("ac1", 13) ;Clear display
pause 50
main:
b0 = "A"
debug ;Position 1
hserout 0, ("ac80", 13) ;Cursor to top corner (ac80 )
hserout 0, ("ad", b0, 13) ;Display data (ad{data} )
; debug ;Position 2
pause 250
goto main
But, if the debug command is moved to 'Position 2'.......
Code:
init:
hsersetup B9600_4, %10000 ;Use LCD Pin 1, no hserin
hserout 0, (13) : pause 100 ;Initialize LCD
hserout 0, (13) : pause 100
hserout 0, (13) : pause 100
pause 500
hserout 0, ("ac1", 13) ;Clear display
pause 50
main:
b0 = "A"
; debug ;Position 1
hserout 0, ("ac80", 13) ;Cursor to top corner (ac80 )
hserout 0, ("ad", b0, 13) ;Display data (ad{data} )
debug ;Position 2
pause 250
goto main
The mystery (to me anyway!) is what is the debug command doing positioned after the hserout that it doesn't do before it and why is it affecting hserout anyway?
John.