We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all,
when you are working with uart transmission, which is the time that you configure between transmitting two consecutive characters? Which is the minimum time allowed for the hardware? Because if you transmit two characters with a time period too short between them, it doesn't work.
Thanks in advance.
which is the time that you configure between transmitting two consecutive characters?
None. Timing is generally the wrong approach to this.
It really should be handled in terms of sequence, rather than time. Any decent UART will trigger an interrupt on completing a transmission. And even silly ones that don't will have some means for you to check that the previous byte has been transmitted, like a busy bit in some register. Use them.
That's for the transmission side of things. The interesting part of the story is on the other side, though. If the recipient can't keep up with a transmitter going at full tilt, you need some means of flow control. Whether that should be XON/XOFF, hardware handshaking or something more complex, is up to the particular implementation's needs and capabilities.