0

This question already has an answer here:

Is a buffer used for outputting data from the arduino?

OR

Is the output from the arduino buffered before sending it to Computer?

Is it the same buffer that is used to store the incoming data and the data that we send back from the arduino?

Eg- If am sending a text through the Serial Monitor to the arduino and I am also doing Serial.println("sth") then are they both using the same buffer?

How can i relate Serial buffer with these processes

Please Help!

Arduino Noob

EDIT-1

Can you please explain about the TX buffer overflow

marked as duplicate by Chris Stratton, MatsK, user31481, gre_gor, jose can u c Jan 18 '18 at 14:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

Is it the same buffer that is used to store the incoming data and the data that we send back from the arduino?

there are two buffers RX buffer and TX buffer.

Is a buffer used for outputting data from the arduino? OR Is the output from the arduino buffered before sending it to Computer?

TX buffer holds the data until they can be send. Data are send from TX buffer by interrupt routine.

Can you please explain about the TX buffer overflow

TX buffer overflow doesn't happen, because it is easy to handle the situation. The interrupt routine can send the data only at set baud rate. If the program fills the buffer faster then the interrupt empties the buffer, then the TX buffer fills, but the write function knows that the buffer is full and waits in a while cycle until there is space for that one byte to write.

  • Can you please explain about TX buffer overflows – rimalonfire Jan 15 '18 at 18:09
  • This is incorrect. The TX buffer does not overflow, rather attempted writes to the Serial object block until there is space. Unfortunately, speculation about this is yet one of the many consequences of the Arduino documentation failing to state the information needed by serious programmers in fine print at the bottom of its its beginner-friendly pages. – Chris Stratton Jan 16 '18 at 0:25
  • I edited the section about the overflow, to not only explain what overflow is, but how it is avoided – Juraj Jan 16 '18 at 8:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.