View previous topic :: View next topic |
Author |
Message |
thall Guest
|
clear screen function |
Posted: Thu Jun 21, 2007 7:39 am |
|
|
Is there a clear screen function (clrscr) for the CCS compiler? |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Thu Jun 21, 2007 8:12 am |
|
|
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
|
Re: clear screen function |
Posted: Thu Jun 21, 2007 8:38 am |
|
|
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
|
|
Posted: Thu Jun 21, 2007 9:31 am |
|
|
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
|
|
Posted: Thu Jun 21, 2007 9:40 am |
|
|
Using ANSI Escape codes will clear the screen
Code: |
fprintf( stream, "\x1B[2J" );
|
|
|
|
future
Joined: 14 May 2004 Posts: 330
|
|
Posted: Thu Jun 21, 2007 5:41 pm |
|
|
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. |
|
|
|