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

SIOW Clear Screen / move cursor

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



Joined: 11 Sep 2014
Posts: 7
Location: Newport Beach,CA

View user's profile Send private message

SIOW Clear Screen / move cursor
PostPosted: Mon Jul 27, 2015 6:35 pm     Reply with quote

Is there a character sequence that will clear screen when using the SIOW serial monitor?

Can the cursor be moved?

Does it emulate any terminal commands?
dyeatman



Joined: 06 Sep 2003
Posts: 1933
Location: Norman, OK

View user's profile Send private message

PostPosted: Mon Jul 27, 2015 7:28 pm     Reply with quote

The SIOW will respond to VT100 esc sequences
_________________
Google and Forum Search are some of your best tools!!!!
NB_CAD



Joined: 11 Sep 2014
Posts: 7
Location: Newport Beach,CA

View user's profile Send private message

PostPosted: Tue Jul 28, 2015 6:17 am     Reply with quote

I tried this without success. Here is my code to make a simple oscilloscope. I tried using the Graph but found it to be slow and had difficulty to make it reset reliably. Also it is less universal.
Code:

   printf("Points Collected => %3u \n\r",plotPoints);
   for (i=160; i>0 ;i-=10){
      outString="";
      for (int8 plotIndex =0; plotIndex<plotPoints; plotIndex++){
         if (plotArray[plotIndex]>i) {
            strcat(outString,"X");
         }else{
            strcat(outString," ");
         }
      }
      printf(outString);printf("\r\n");
   }
   printf("\r\n Clearing ");
   delay_ms(100);            // Whenever in doubt I delay
   printf("\x1b[2J");          // CLEAR SCREEN CODES ????
   delay_ms(2000);
   printf(" Clear ");

Result -->

X
XXX XXX X
XXXXX XXX X
XXXXXXXXX X
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XXX
XXXXXXXXXXX XXX
XXXXXXXXXXX XXX
XXXXXXXXXXX XXXX
XXXXXXXXXXXXX XXXXX

Clearing  Clear Points Collected => 65


X
XXX XXX
XXXXX XXX X
XXXXXXXXX X
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XXX
XXXXXXXXXXX XXX
XXXXXXXXXXX XXX
XXXXXXXXXXX XXXX
XXXXXXXXXXXX XXXXX

Clearing



I appreciate your assistance.
dyeatman



Joined: 06 Sep 2003
Posts: 1933
Location: Norman, OK

View user's profile Send private message

PostPosted: Tue Jul 28, 2015 12:33 pm     Reply with quote

printf("\033[2J"); // clear screen

printf("\033[H"); // home the cursor
_________________
Google and Forum Search are some of your best tools!!!!
NB_CAD



Joined: 11 Sep 2014
Posts: 7
Location: Newport Beach,CA

View user's profile Send private message

PostPosted: Tue Jul 28, 2015 8:14 pm     Reply with quote

Thank you for your help. Your code is clean and works well although I needed to run the program on Tera Term.

I like the SIOW since my product is developed from the RapidUSB. It allows me to develop without needing to use my ICD64. Ultimately i will need to run the product on another terminal emulator (Unless I am missing a configuration setting for the SIOW.)

Image of the ASCII plot diagnostic screen with level information.

[img]https://dl.dropboxusercontent.com/u/61824884/Plot%20with%20Sonar.PNG [/img][img][/img]
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