PDA

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



daniel ding
11-13-2011, 11:53 AM
I want to display sth useing a 16*2 LCD, how to only clear one line and keep another one display?

Leon
11-13-2011, 12:00 PM
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.

bozo
11-13-2011, 12:02 PM
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