How to know when serial has finished sending

Matt, your RS485 transceiver should detail the time it takes to clock out a bit in the datasheet. For very fast communication, you would need to know this (it's easy to wait too long). For doing the same thing, I have (generally):

#include <util/delay.h>

...

#define SER_BPS 57600.0

// serial clear time in uS (how long it takes to punch one bit
// out through the RS485 transceiver at the current bitrate).
// the transceiver adds 0.07uS delay in punching out a bit

#define SER_CLEAR_TM 1000000.0 / SER_BPS + 0.07

...

void write(uint8_t p_dat) {
    
    // TODO: Abstract for non Atmega328P platforms
    
    while (!(UCSR0A & _BV(UDRE0)));
    
	// set xmit pin high
    PORTD |= _BV(PORTD5);  
    // clear tx complete flag before write, just incase serial object doesn't
    UCSR0A |= _BV(TXC0);
    
    UDR0 = p_dat;		
    
	
    while(!(UCSR0A & _BV(TXC0)) );
    
    _delay_us(SER_CLEAR_TM);
    
    PORTD &= ~_BV(PORTD5);
    
    
}