This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

UART Question

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.

Parents
  • 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.

Reply
  • 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.

Children
No data