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

Flex_lcd question...

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








Flex_lcd question...
PostPosted: Mon Mar 31, 2008 12:16 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Mar 31, 2008 12:44 pm     Reply with quote

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:
Code:
lcd_putc('\f');
meereck



Joined: 09 Nov 2006
Posts: 173

View user's profile Send private message

PostPosted: Mon Mar 31, 2008 3:02 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Mar 31, 2008 3:12 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Mar 31, 2008 3:15 pm     Reply with quote

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.
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