View previous topic :: View next topic |
Author |
Message |
Guest
|
Flex_lcd question... |
Posted: Mon Mar 31, 2008 12:16 pm |
|
|
Hi,
I'm using the flex_lcd4x20.c driver in a project. Periodically, I need to clear the LCD of all characters. Is calling the lcd_init function the best way to do this, or is there another, better way?
Dave |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Mar 31, 2008 12:44 pm |
|
|
The function interface is the same as for the CCS LCD drivers.
The following is from the start of the CCS LCD420.c driver file.
It lists the available commands:
Code: |
// lcd_putc(c) Will display c on the next position of the LCD.
// The following have special meaning:
// \f Clear display
// \n Go to start of second line
// \b Move back one position
|
Use this to clear the screen:
|
|
|
meereck
Joined: 09 Nov 2006 Posts: 173
|
|
Posted: Mon Mar 31, 2008 3:02 pm |
|
|
is there any simple way how to clear one row only? Or do I have to write a subroutine for that?
cheers Meereck |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Mar 31, 2008 3:12 pm |
|
|
Use lcd_gotoxy() to set the cursor to the start of the desired row,
and then use a printf() statement to fill the row with spaces. |
|
|
meereck
Joined: 09 Nov 2006 Posts: 173
|
|
Posted: Mon Mar 31, 2008 3:15 pm |
|
|
PCM programmer wrote: | Use lcd_gotoxy() to set the cursor to the start of the desired row,
and then use a printf() statement to fill the row with spaces. |
Right, that is the subroutine I was thinking of. Pity, there is no "\smthng" command for it.
Thank you for an instant reply. |
|
|
|