Serial output using interrupts

Railroader:
Thanks for answering!

I use Serial.print for dubugging an ongoing real time actitivty and the serial print affects the real time process.
My question was how to make it run that way, using interrupts. To me it does not look like serial print is doing that.

Ok, you have done your homework. The USB runs at megabit/sec speeds. The code that handles the Serial.print has to feed the USB bytes based on the baud rate you programmed. So it need to wait the number of milliseconds until it can feed in the next byte.

The same procedure occurs on the PC end. The USB receives the byte immediately, but the serial emulator must wait to read it until the baud rate time has gone by. Otherwise normal PC serial program won't work properly.

As long as you are using the USB connection you will always have the problem. The only way to help is to set the baud rate to a really high speed.

In the old days, we used to get an interrupt from the UART/USART chip that indicated the tx buffer was empty and needed another byte or the rx buffer had a byte ready to be read. These so-called UARTS aren't that smart!

Paul