• AVR Freaks

Hot!UART tx delay

New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2020/01/26 09:39:07
  • Location: 0
  • Status: offline
2020/02/01 08:18:14 (permalink)

UART tx delay

Hello everyone,
there is something I don't understand about the delay necessary for UART transmission.

A premise: working with PIC24FJ1024GB610, at 8 MHz Fosc, I have already verified that every single nop requires 250 ns (2 cycles), as expected.
Now, in the Microchip documentation:
  • it is stated that before sending the first character it is necessary to wait at least (1 / baudrate) seconds: working at 9600 baud, this wait would be about 105 µs;
  • the DELAY_105us example function provides for a wait corresponding to 4201 nop.
  • in my tests the transmission delay must be applied before each character sent (not only before the first one);
  • working at 8 MHz, 105 µs should be around 420 nop, not 10 times as much; however, if the delay is less than 4136 nop (in my tests), the transmissions fail.

So ... I missed something: why is it necessary to wait about 4200 nop (at least 4136) instead of 420 only?
Thank you for any suggestion.

0 Replies Related Threads

    Jump to:
    © 2020 APG vNext Commercial Version 4.5