Hi,
Can you use an extra wire in the cable that is usually pulled up. Then talking pic can can check if this signal is High (tx line free to use) and then pull it low and start the TX to the device. If the PIC sees the wire low it knows it has to wait for the signal to go high (released by the other pic) before it can take control of the signal and do TX.
Pin 8 in the 9-pin rs-232 connector CTS (clear to send) or pin 7 RTS might be used for this but you will need to pullup the signal so the transmitting PIC can ground the signal when it is in control of it (TRIS.x reg to output and port.x to 0). When finished transmitting the pic sets the pin's TRIS.x register to an input to make it 3-state (floating).
Hope fully you can change your HW and then this a simple and cheap solution.
Bookmarks