Main Site Documentation

UART multiple connections


I want to connect UART TXD1 to an existent connection TXD2->RXD so that I can send commands to device when needed, from both TX . I need I way to filter or protect MCU TXD2 from damages and noise. Is there a good way to do so?
I’m thinking of diode or something similar to put on the line.

Here is a schematic to show what I mean.


The simple solution is to send your command and then put your Tx pin in Hi-Z (make it an input) afterwards. As long as both Tx’s don’t try and send at the same time you should be fine.

While you have the pin on input you can check if the line is busy before sending.

This kind of thing gets rather complicated. Google “multi-drop serial bus”, “Multi master communications”, “collission detection” etc.

RS422 and RS485 is more suited to this kind of thing if that is an option.


This should get you what you want. It will not prevent data corruption if both senders send at the same time, but nothing will be damaged…


Tanks just what I wanted something simply. Even do its nice to have some collision detection control
its to complex for my needs. The protection diode is what I was thinking about firsts.

I have used one set before, one with fet bus, there I routed the connection between couple of ports, and controlled the fet bus with EMX module. But I needed something simply.