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

clear screen function

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







clear screen function
PostPosted: Thu Jun 21, 2007 7:39 am     Reply with quote

Is there a clear screen function (clrscr) for the CCS compiler?
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Thu Jun 21, 2007 8:12 am     Reply with quote

Do you mean to clear an LCD screen?

Tell us which LCD your using.


Most people do this themself and just reset the screen or
send it spaces.
SparkyEE



Joined: 15 Jun 2007
Posts: 7

View user's profile Send private message Yahoo Messenger

Re: clear screen function
PostPosted: Thu Jun 21, 2007 8:38 am     Reply with quote

thall wrote:
Is there a clear screen funtion(clrscr) for the CCS compiler?


If you want to "clear screen" when on a RS-232 UART port. Just print a "form feed"

printf("\f");
thall
Guest







PostPosted: Thu Jun 21, 2007 9:31 am     Reply with quote

Sending ADC conversion values to a PC through RS232. I have a printf in a loop to constantly update the conversion values. I need a way to clear the data after each loop, in order to keep the conversion values on one line.
kevcon



Joined: 21 Feb 2007
Posts: 142
Location: Michigan, USA

View user's profile Send private message

PostPosted: Thu Jun 21, 2007 9:40 am     Reply with quote

Using ANSI Escape codes will clear the screen

Code:

fprintf( stream, "\x1B[2J" );
future



Joined: 14 May 2004
Posts: 330

View user's profile Send private message

PostPosted: Thu Jun 21, 2007 5:41 pm     Reply with quote

Look for those escape codes and instead of clearing the screen you should reposition the cursor and overwrite the old reading with a new one.
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