Hello PICple, as I'm doing communication between various devices in an half-duplex RS485 network, I'm thinking in a way to avoid data collision. As I'm using the hardware USART of the PICs, the big danger is that while the PIC is receiving a data on the serial input, the software pull down the DRS (drive/receive select) line on the 75176 (driver) and put something on TXREG. It will do this because there's no way to know that there's an incoming byte on the RX pin until the byte is completely received. The RCIF Flag is set only when the byte have completely arrived on the RX pin. So, I think that I could tie the RX pin to the RB0/INT pin, so that when an start bit arrives at the RX pin, pulling it LOW, an interrupt is generated. In this interrupt I set a bit variable (BUS_BUSY) to inhibit serial output. When I receive an RCIF interrupt, I reset BUS_BUSY, so the serial output routine could know it can send the data. If the RB0 pin isn't available, we would pull the RX pin for about the duration of 10 bits to have confidence that we could start sending data. Is this an standard way to implement data collision? Would this be reliable? What do you think. Best regards, Brusque ----------------------------------- Edson Brusque Research and Development C.I.Tronics Lighting Designers Ltda Blumenau - SC - Brazil www.citronics.com.br Say NO to HTML mail ----------------------------------- -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.