Clean virtual terminal in Proteus

Sushil Kumar
Hello 

I am new here, recently I working in Proteus using LPC2138 micro-controller
and make the programs in keil. 

I connect virtual terminal with LPC2138 and i able to transmit string to
virtual terminal, 

but i am not able to clean the virtual terminal.

Is any command in C program which clean the virtual terminal?

Here is code i c program:


#include <LPC213X.H>

#define in1 (1<<3)
#define in2 (1<<4)
#define in3 (1<<5)
#define in4 (1<<6)


void delay(unsigned int m)
{
  T0MR0 = 3000*m;
  T0MCR = 0x04;
  T0TC = 0x00;
  T0TCR = 0x01;
  while(T0TC < T0MR0);
  T0TC = 0x00;
}

void ser_tx(unsigned char ch)         // transmiter
{
  U0THR = ch;
  while((U0LSR & (1<<5)) == 0);
}
                      
char ser_rx()                // receiver
{
  unsigned char ch;
  while((U0LSR & (1<<0)) == 0);
  ch = U0RBR;
  return(ch);
}

void ser_str(char *ch)
{
  while(*ch != '\0')
  {
    ser_tx(*ch++);
  }
}

int main()
{
  //char buffer[100];
  char ch;
  IODIR0 = 0xff;
  U0LCR = 0x83;  //  Enable DLAB and using 8-bit character lengh
  PINSEL0 = 0x05;  // assign the PINs RX and TX for UART0  
  U0DLM = (unsigned int)((3000000/(16*9600))/256);   // calculate baud rate
for MSB
  U0DLL = (unsigned int)((3000000/(16*9600))%256);   // calculate baud rate
for LSB

  U0LCR = 0x03;  // Disable the DLAB, for protect the further changes to
these values
  U0FCR = 0x07;  // Enable and reset TX and RX FIFO

  ser_str("1. First Motor Rotate\r");
  ser_str("2. Second Motor Rotate\r");
  ser_str("3. Both Motors Anti-rotation\r");
  ser_str("4. Both Motors Stop\r");
  ser_str("Enter your choice for motor rotation\r");
  ser_str("Choice= ");
  while(1)
  {
    ch = ser_rx();
    ser_tx(ch);
    switch(ch)
    {
      case '1':
            IOSET0 = in1;
            IOCLR0 = in2;
          //  delay(250);          
            break;

      case '2':

            IOSET0 = in3;
            IOCLR0 = in4;
          //  delay(250);
            break;
      case '3':

            IOSET0 = in2;
            IOCLR0 = in1;
          //  delay(250);
            IOSET0 = in4;
            IOCLR0 = in3;
          //  delay(250);
            break;
      case '4':
        
            IOCLR0 = in2;
            IOCLR0 = in1;
          //  delay(250);
            IOCLR0 = in4;
            IOCLR0 = in3;
          //  delay(250);
            break;
      default:
            ser_str("\rSorry! Your choice is wrong\r");
            break;
    }

  }  
}

tono
i don't understand why i comment here, im confuse to put my backlink, very
good post even I dont understand, thank you

http://www.impressdriver.com/
http://www.drivers.ga
http://www.printerdriver.ga
http://www.emosianisme.com
http://www.smiletale.com
http://www.risetcenter.com
http://www.firmwaredownload.ga
http://www.asyafrawa.com
http://www.autobild.ga
http://www.printerdriver.ga
http://www.pctechni.ga
http://www.herbalisme.ga
http://www.likeus.ga
http://www.lifewithcancer.ga
http://www.diabeteslife.ga
http://www.gadgetinfo.ga
http://www.insidecamera.ga
http://www.businessflow.ga
http://www.foodexplorer.ga
http://www.monyet.ga
http://www.playnow.ml
http://www.whatabout.ga
http://www.gamerinside.ga
http://www.viralhuge.com

sono
backlink me better than the one above :v

http://www.menanamcabe.ga/'
http://www.menanamcabe.ga/2016/04/cara-menanam-cabe-merah-Intensif.html
http://www.menanamcabe.ga/2016/04/tips-dan-cara-menanam-cabe-rawit.html
http://www.menanamcabe.ga/2016/04/cara-menanam-cabe-yang-baik-dan-benar....
http://www.menanamcabe.ga/2016/04/cara-menanam-cabe-merah-di-polybag.html
http://www.menanamcabe.ga/2016/04/cara-menanam-cabe-rawit-di-polybag.html
http://www.epson-drivers.com/
http://www.kabarlucu.com
http://www.epson-drivers.com/2016/05/epson-l310-driver-download.html
http://www.kabarlucu.com/2016/05/sejarah-uang.html
http://www.epson-drivers.com/2016/05/epson-m200-driver-download.html
http://deqwan1.blogspot.com/

tono
http://transparan.org/Thread-tewasnya-abu-wardah-santoso-sang-mujahidin-...

support
good job working in Proteus using LPC2138 micro-controller
and make the programs in keil. 

www.hpsupportdriver.com

mr. ratna
http://www.printdriver.xyz
http://www.driverpedia.xyz
http://www.printscandriver.com
http://www.pctechno.ga

Egy Damar Jati
<a href='http://alldriverprinter.com/' title='All Driver Printer'>All
Driver Printer</a>

support driver
get driver

http://www.downloaddriver.ga driver and software download 
http://www.printer-driver.ga printer driver download
http://www.eprinterdriver.ga epson printer driver
http://www.drivers-hp.net/ HP Printer Driver Download 
http://aboutdrivers.blogdetik.com/ Hp Printer Review
http://printer-review.weebly.com Visit

jones
visit me honeyyy , muachhh <a
href="http://howtoinstalldriver.blogspot.com/2016/12/how-to-install-driver-eps...
Driver</a>

jones
<a
href="http://howtoinstalldriver.blogspot.com/2016/12/how-to-install-driver-eps...;
Epson Driver </a>

Reply

Name
eMail (not visible)
Subject (no text only in upper case; no HELP, URGENT...)
Text
HTML tags are not supported and links are generated automatically if they start with http or ftp.
Please submit long source code or log files as attachment (only registered users).
Please enter the number: 2 3 7 6