Question regarding LCD display character erasing
RussM
Posts: 27
I am having a hard time figuring out how to erase specific characters that are sent to my LCD Display. The code that I am working with looks like this:
LCD.str(string(1,"Quadrature Decoder Demo", 13))
LCD.str(string("
", 13, 13))
LCD.str(string("Value = "))
repeat
LCD.dec(offset)
LCD.tx(32)
waitcnt(clkfreq/10 + cnt)
My goal is to have the printed statements before the repeat loop be static on the display with the only thing changing being the "offset" value. No matter what I do the "offset" values gets printed one after another on the screen. I would like there to only be one value of "offset" on the screen at a time. Can anyone help!
LCD.str(string(1,"Quadrature Decoder Demo", 13))
LCD.str(string("
", 13, 13))
LCD.str(string("Value = "))
repeat
LCD.dec(offset)
LCD.tx(32)
waitcnt(clkfreq/10 + cnt)
My goal is to have the printed statements before the repeat loop be static on the display with the only thing changing being the "offset" value. No matter what I do the "offset" values gets printed one after another on the screen. I would like there to only be one value of "offset" on the screen at a time. Can anyone help!
Comments
It might help to post your entire program, but here's what comes immediately to mind: If the driver object includes control characters for positioning the cursor, you should use them to move the cursor to the screen X,Y position of the first digit each time before calling dec.
-Phil
Update! I got it to work by moving the cursor to the appropriate position on the screen. Thank you, Phil!
-Phil