Shop OBEX P1 Docs P2 Docs Learn Events
anyone who can tell me how to clear only one row of the 16*2 LCD and keep another row — Parallax Forums

anyone who can tell me how to clear only one row of the 16*2 LCD and keep another row

daniel dingdaniel ding Posts: 52
edited 2011-11-13 04:02 in Propeller 1
I want to display sth useing a 16*2 LCD, how to only clear one line and keep another one display?

Comments

  • LeonLeon Posts: 7,620
    edited 2011-11-13 04:00
    I don't think that there is a command for the LCD controller to do that. You could write a function to position the cursor at the beginning of the line and then write spaces into all the character positions on that line.
  • bozobozo Posts: 70
    edited 2011-11-13 04:02
    assuming that you're using one of the LCD objects from the library (e.g. LCD_16x2_8bit.spin),
    you can simply move to the start of the row you want to clear, then write spaces

    for example, if say you defined LCD using the object mentioned above, you can do this:

    LCD.move(1,2) 'move to column1, row2
    LCD.str(string(" <insert up to 40 spaces here> "))

    cheers,
    Mark
Sign In or Register to comment.