My question is with the
Serial.print(data) command.
When it comes to Serial communication (with a chip with only 1k ram as the uno) the question of buffers is quite prominent. I for instance am aware that I have a
3character/byte UART input buffer and a -i think- 128byte input buffer by the
HardwareSerial buffer(like well explained here
http://binglongx.wordpress.com/2011/10/26/arduino-serial-port-communication/)
My question is. What is with the outgoing data?
I can imagine that I can produce data faster than it can be shuffled away via a 9600baud rate?
void loop()
{
Serial.print("A");
}
at 16Mhz this loop should be repeated quite easily more than 20'000 times per second.
(assuming hereby that 16Mhz = 16'000'000 operations per second => the loop would need 800 operations to run, which I doubt for the simple one-line command).
=> It seems to me that the Arduino would at 9600 bps baud rate would fail here?
is this right?
a) What happens then. does it crash and "reboot" ?
b) Does it depleat the ram?
c) does it simple discard excess data? (if so which data is discarded, the earlier or the later one?)
thank you for your insights!
BTW:
this is not very much relevant to my question.
But maybe it has a slight impact so I want to mention
that I use Linux and /dev/ttyACM0 to communicate via the command line.
so the data arriving would arrive there.
=> also, I just want to mention that I do not use the IDE (because I dislike the Java-shit "security risk"... so I code using makefiles and communication to the Arduino is done via /dev/ACM0)