Try this LCDOUT $FE,1,#mynumber," "
$FE,1 should clear display. But for some reason your display isn't cleared.
Try this LCDOUT $FE,1,#mynumber," "
$FE,1 should clear display. But for some reason your display isn't cleared.
I use the following code to display a word variable which contains the value between 0 and 100
Just change maxbright for your variable and you should be fineCode:If maxbright = 100 then LCDOut $FE,$c0,#maxbright,"%" endif If maxbright =0 or maxbright <10 then LCDOut $FE,$c0,dec1 maxbright,"% " endif if maxbright >=10 and maxbright <100 then LCDOut $FE,$c0,dec2 maxbright,"% " endif
Last edited by Scampy; - 11th July 2017 at 09:14.
I don't have problem with leading zeros, so I just use DEC3 to make it simple.
I resorted to a longer method of writing to an LCD. To get numeric values to print, first I create variables for each digit.
I then print individual characters to the LCD.Code:Val VAR BYTE ValA VAR BYTE[3] 'Occupies 3 consecutive addresses ARRAYWRITE ValA, [#Val] IF Val < 100 then ValA[2] = ValA[1] ValA[1] = ValA[0] ValA[0] = " "
Ok. I get it now. Never really used LCDOUT or an LCD for that matter. Wasn't clearing the display, thinking I could just manipulate line 2 leaving line 1 intact. Silly me. --- thanks
Bookmarks