CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

lcd clean function?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
young



Joined: 24 Jun 2004
Posts: 285

View user's profile Send private message

lcd clean function?
PostPosted: Thu Dec 22, 2005 8:44 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Dec 22, 2005 9:04 am     Reply with quote

I think what you're looking for is '\f'.
young



Joined: 24 Jun 2004
Posts: 285

View user's profile Send private message

PostPosted: Thu Dec 22, 2005 9:07 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Dec 22, 2005 9:25 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group