Shop OBEX P1 Docs P2 Docs Learn Events
Question regarding LCD display character erasing — Parallax Forums

Question regarding LCD display character erasing

RussMRussM Posts: 27
edited 2013-02-11 18:43 in Propeller 1
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!

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-02-11 16:44
    Which LCD display are you using, and which object to drive it? Also:

    attachment.php?attachmentid=78421&d=1297987572

    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
  • RussMRussM Posts: 27
    edited 2013-02-11 17:22
    I attached the appropriate code.

    Update! I got it to work by moving the cursor to the appropriate position on the screen. Thank you, Phil!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-02-11 18:43
    Okay, so you're using FullDuplexSerial. But you did not answer my question as to which LCD module you're connecting to. The reason it matters is that not all LCD modules respond to the same control codes for cursor positioning.

    -Phil
Sign In or Register to comment.