Hi,
You can share the RXin (TXout of PC) from the PC to the PICs so that both of them listen to what the software is asking to do. So the objective is to prevent clash of TXout (Rxin of PC) line. If you are using two MAX232 on both the device then things get complicated. You already thought of the DTR line. So lets do it in this way.
1. Do not use individual MAX232
2. OR both the PICs TX output by a couple of 1N4148 diodes.
3. Use the ORed output to the TXin of the MAX Chip
4. Use the same ORed output to form some sort of bus activity signal to both the PICs.
5. Now in your software just before you transmit check for activity (at least one frame according to your baud rate)
6. If the line is active go idle for a few secs (or so according to your traffic and protocol).
So when one PIC is sending the other would just wait for the bus to become free (sort of inverse DTR)
Regards
Sougata
Bookmarks