Arduino nano - serial transmitting very slow

I have a problem with my aruino nano v3.0. It seems, the usb-serial cannot transfer data full speed?
with my other arduino (leonardo) works fine.

here the sketch:

void setup()
{
  Serial.begin(115200);

  // loop here
  for (;;) {
   while(Serial.available()==0) ; 
     Serial.read();
  }
}

void loop(){
}

with processing sending a lot of bytes with the same baud-rate, the result on nano:

Average frames/sec: 37, bytes/sec: 11986
Average frames/sec: 36, bytes/sec: 11680
Average frames/sec: 35, bytes/sec: 11647
Average frames/sec: 35, bytes/sec: 11645
Average frames/sec: 35, bytes/sec: 11580

same sketch, same test with leonordo returns 132 frames/sec (=41976 bytes/sec)

what's wrong with nano?
I tried another nano board, result is same..

thanks

edit: tested on windows 7 (64bit) with corrected latency-time on the COM-driver and Ubuntu 12.10 (32bit)

Serial.begin(115200);

11 520 characters per second.
Maximum.

I removed this line and got same speed.
with

Serial.begin(470000)

still same result.

hmmm Leonardo-board can receive more then 43 000 bytes/sec???

The UNO serial port uses a hardware UART which restricts the speed to whatever baud rate you set.
I think the Leonardo uses the native USB transfer which is much higher.

Pete

The Leonardo's probably buffering the received characters in the 32u4's built-in USB - I think your method is flawed, you have no handshake from the target processor.

thank you for the information :wink: