here is the source code for the Serial object:
./hardware/arduino/cores/arduino/HardwareSerial.h
./hardware/arduino/cores/arduino/HardwareSerial.cpp
u could try to use time slots by using micros() like this:
uint32_t last = 0;
void loop() {
for (;;) {
const uint32_t now = micros();
if (now-last >= 1000) {
last = now;
break;
}
}
analogRead...
Serial.write...
}
1kSps (10bits payload + 5bit error detection + 1bit high/low byte = 2B/sample = 16kbit/sec) should be ok on a 115200kbit/sec link...