slow usb data transfer

Hello,

i have the following code :

extern uint8_t SmallFont[];

#include <UTFT.h>
#include <UTouch.h>

UTFT   myGLCD(ITDB32S,CTE_shield,25,26,27,28);  // Remember to change the model parameter to suit your display module!
UTouch myTouch(6,5,32,3,2);


void setup()
{
  delay(1000);
  SerialUSB.begin(20000000);
  while (!SerialUSB); 
 
  myGLCD.InitLCD();
  myTouch.InitTouch();
  myTouch.setPrecision(PREC_MEDIUM);
  
  myGLCD.clrScr();
}


void loop()
{
 char kleur[76801];
  int x=0;

  myGLCD.setFont(SmallFont);
  myGLCD.print("Waiting for data",100,0);
   
  while (x=1)
  { if (SerialUSB.available())
    { 
      SerialUSB.readBytes(kleur,76800); 
      myGLCD.print("Done             ",100,0);
     }
  }
  
  delay (10000);  
}

but when i upload a file to my DUE through the native USB port it toke me 41 seconds to upload that file.
i thought USB would be faster.

did i do something wrong ?

for uploading i use realterm on a windows 7 PC

could it be faster if i read the byte's one by one instead of readbytes (because this is done at aproximate 9600 baud)
i realy need it faster.

Yes, It most likely will be faster if you read them one by one. You are saying "if any data is available, read 76800 bytes". How do you know there are that many available? Also, if you are going to do that then you might want to decrease the delay afterwards.

Well, i know becaus my pc send's that much bytes.

you might ask in the Due subforum