Skip to main content
3 of 6
added 7 characters in body
dda
  • 1.6k
  • 1
  • 12
  • 18

Arduino Uno Serial.write() how many bits are actually transmitted at once by UART?

I am trying to maintain a delicate timing while handling data transmission. I want to send 6 bytes at a time, which takes around ~44 us when I time Serial.write(). The time it takes from Arduino Serial to computer is irrelevant in my case. I only mind the run time of the function.

My idea is sending not all 6 bytes but a few at a time, so that the total sending time overhead would be distributed between time-sensitive tasks. Note that I will never be exceeding the buffer size, so the Serial.write() will never wait for actually transmission to be completed.

My question is, how many bytes should be used with Serial.write() at a time? I've heard the Serial library processes 16 bits (2 bytes) at a time. What happens if I try to send a single byte? Does it wait a certain time for the second byte and if doesn't arrive then it pushes a single byte?