Arduino serial transmit (Tx) buffer - software/hardware question

Hi all.

This question involves using "Serial.print" for serial communications. In one online discussion, there's discussion about a 63 or 64 byte buffer --- maybe ring-buffer. In another discussion, there is a mention of 1 byte hardware buffer. In the end, just to get things properly understood..... this 64 byte buffer is a software queue buffer, right?

So a "Serial.print" dumps the various bytes it contains to the 64 byte software buffer, right? And arduino serial communications handling code will check to see if the hardware buffer can accept 1 byte, right?

Just trying to piece things together here, to see if I can understand it a bit. Thanks all!

http://forum.arduino.cc/index.php?topic=17622.0

https://forum.arduino.cc/index.php?topic=348826.0

(deleted)

spycatcher2k:
Basically - Yes

Spycatcher.... thanks !

So a "Serial.print" dumps the various bytes it contains to the 64 byte software buffer

Serial.print() doesn't "contain" any data. It may need to convert int or float data to a string. It then write()s the characters in the string to the outgoing buffer and returns, if there is room in the buffer for the data that it needs to add.

If there is not room, print() blocks until there IS room in the buffer. The bytes from the buffer are then copied, one at a time, to the one byte register, where they are output one bit at a time.