But if I send it to the serial port in loop, I have to disable interrupts for each byte sent. Otherwise the ISR will interrupt the serial routine.
According to what I've read, you have to disable interrupts during serial transmission.
I assumed this is because you don't want it to be interrupted in the middle of a string of 8 bits?
The key is to avoid waiting for the 1 byte buffer. Maybe interrupting this wait is bad? Probably not.
You need to use a ring buffer to hold the data to be serially transmitted and use the uart tx interrupt to send each character. I'm surprised the Serial class wasn't written to do this.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16