>What's the cleanest way, in a PIC, to do this? I think I >can't use the UART Transmit interrupt, because it does not >tell you when the last byte has gone out on the wire. Actually you could do this. It does require some logic at the receiving end to know that the message has ended, but I have seen it done where the processor was more of a state machine than a processor as we know it. What you do is put an extra character at the end of message (typically 0xFF) and the receiver then has to be prepared for a corrupted character after the end of message character that precedes the 0xFF, as the 0xFF can be corrupted because you may be turning off the RS485 transmitter part way through the start bit. If you turn it off after the start bit, then there is no corruption, bit depending on how fast another device can turn round to transmit then you may get the first character from the next transmitter corrupted because the start bit occurs inside the 0xFF character time. You will also need to look at the timings of the UART to ensure that the TxBufEmpty flag doesn't occur during the stop bit of the previous character. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist