On 22 Nov 2002, at 6:25, Dave Tweed wrote: > On an 8051 system with RS-485 that I built, I had a set of software timers > that were driven by an interrupt from the same hardware timer that > generated the UART bit rate. When I put the last byte into the UART > transmit buffer, I just started a software timer for 20 bit times, and when > that timer expired, I turned off the transmitter. 20 bit times allows > enough time for the last byte to go out, plus one full byte time of > enforced idle time between packets. Hmm - well with the AVR 2313 etc there is also a UART Transmit Complete interrupt "when the entire character (including the stop bit) in the Transmit Shift register has been shifted out and no new data has been written to the UDR. This flag is especially useful in half-duplex communications interfaces, where a transmitting application must enter receive mode and free the communications bus immediately after completing the transmission". I used this for a 485 controlled remote device. Is it true that the PICs don't have this facilty? (I've only used 16f84s). George Smith -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu