RS485 - How long should you keep the Driver enable pin HIGH?

We investigated a while back in more depth. There is a register you can read to see when the last bit has cleared the transmitter (1), but at a given baud rate that will always be the same, so reading the register, and doing a fixed delay, are going to amount to the same thing. You might be able to tweak it down by using delayMicroseconds (eg. to 1100 uS).


  1. I think this might have been it:
 while (!(UCSR0A & (1 << UDRE0)))  // Wait for empty transmit buffer
     UCSR0A |= 1 << TXC0;  // mark transmission not complete
 while (!(UCSR0A & (1 << TXC0)));   // Wait for the transmission to complete