Multiplexing UART

Are you married to UART? SPI would handle this better I think. The slave select would give you the multiplexing and you could prioritize one slave more than the other based on whatever the master is doing or expecting from the slaves. Speed should be at least as fast if not faster than UART. This example gets at the idea.


  1. For three devices no, for more, check the datasheet with regards to input capacitance.

  2. Not quite dangerous but certainly it won't work

  3. a) No b) yes. With few slaves it would be better with wired AND ( half connections needed) if your slaves are not on the same board.

  4. Obviously, the working one, b

  5. Yes

    Edited to give some details

2 and 3a , even if you ignore "don't connect two outputs together" recommendation everyone agrees, the result of two ones and a zero will never be zero for cmos outputs with almost symmetrical characteristics.

3b You either have a wire from each slave to a N-input (star-like configuration) or at each slave you have an AND from it's output and the chain and use the And output for the next slave chain input.

schematic

simulate this circuit – Schematic created using CircuitLab

Obviously the chain configuration is not hot-plug.

Wired AND, you have two options depending on the slave capabilities.

If you have open drain/collector outputs for TX then you can connect them together and add a global pull-up resistor.

If not then a diode on each slave will act as a wired and as follows:

schematic

simulate this circuit

You also have a third option, simply to put the slave Tx output to HiZ after answering to a message, a pull up resistor is still needed.


You have to ensure they don't transmit at the same time. For example by the master polling the slaves.

Use diodes to connect multiple TXD together, pull up R at master. You can just use firmware if you want, and turn the TXD to input when not transmitting also, but diodes are easier.

All RXD can just be connected.