View previous topic :: View next topic |
Author |
Message |
young
Joined: 24 Jun 2004 Posts: 285
|
lcd clean function? |
Posted: Thu Dec 22, 2005 8:44 am |
|
|
IN the library there is a LCD.c driver, but there is not a function for cleaning the lcd, anyone know how? |
|
|
jecottrell
Joined: 16 Jan 2005 Posts: 559 Location: Tucson, AZ
|
|
Posted: Thu Dec 22, 2005 9:04 am |
|
|
I think what you're looking for is '\f'. |
|
|
young
Joined: 24 Jun 2004 Posts: 285
|
|
Posted: Thu Dec 22, 2005 9:07 am |
|
|
thank you, Do you mean that I can clean (clear) the LCD by using
printf(lcd_putc, "\f"); |
|
|
jecottrell
Joined: 16 Jan 2005 Posts: 559 Location: Tucson, AZ
|
|
Posted: Thu Dec 22, 2005 9:25 am |
|
|
Yes, I believe that's the correct usage.
In the driver itself, you will find:
Code: | ///////////////////////////////////////////////////////////////////////////
//// MC_lcd.C ////
//// Driver for common 16x4 LCD modules ////
//// ////
//// lcd_init() Must be called before any other function. ////
//// ////
//// 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 next line ////
//// \b Move back one position ////
//// ////
//// lcd_gotoxy(x,y) Set write position on LCD (upper left is 1,1) ////
//// ////
//// lcd_getc(x,y) Returns character at position x,y on LCD ////
//// ////
///////////////////////////////////////////////////////////////////////////
|
You may find some of the other "special commands" useful. Also, if you look further down in the driver you will see the switch statement that handles the "special" commands. If you need to, you should be able to add any new ones of your own.
Good luck,
John |
|
|
|