I'm trying to send data packets out the hardware serial port of an Arduino Pro 328 (5V, 16 MHz). The packet length is 25 bytes and it is assembled basically by writing Serial.print(0xFE, BYTE) 25 times (with the value of the byte obviously changing on each line). Baud rate is set to 115200. Right now I'm using the millis() function and a couple of variables to send the packet out every 2 seconds. I'd like to send it out much faster than that, but if I do, the output eventually hangs. After 9 packets received, I will get nothing for a long while, and then all of a sudden a bunch of packets will arrive at once. This really doesn't make sense, since it should take no time at all to send out 25 bytes of data. I can't even send the packets once per second!
I'm thinking maybe this has to do with a software buffer in the Arduino firmware or something? I'm really hoping there is a way around this limitation. Seems really strange, but maybe I'm screwing up something obvious.
If anybody has any ideas or suggestions, I'd be eternally grateful. Thank you so much for your time and help!