I'd like to interface my main microcontroller's hardware serial port to two (or more) devices at the same time. My understanding is that UART on my microcontrollers is based on an active-low 5V TTL.
(I know what I'm explaining here can be technically achieved by using better protocols such as SPI and I2C, but my project requires to only be implemented using UART.)
Here's a pseudo-schematics chart of what I'm trying to achieve:
Please note that:
I don't want to use a second UART interface on the master, or any of the slaves.
Only one slave at a time is going to transmit or send data on the line to the master. (e.g. If the slave 1 is transmitting data, slave 2 and 3 should remain idle.)
Whatever the master is transmitting can, and should be received by all of the slaves.
Each slaves should be hot-pluggable, meaning they could be removed or inserted at any time.
The RX and TX wires to the master are parallel between each slave, so no daisy chaining.
So, my questions are as follows:
Assuming the correct impedance is considered, I shouldn't need an additional circuit to transmit data from the master's TX line to any of the slave's RX line simultaneously. Is this correct?
I understand that without current limiting resistors between slaves' TX line and the master's RX line, if any of the devices begin to broadcast data, the line between the devices will short circuit and I risk damaging them. Is this correct?
Assuming the items 1 and 2 are correct:
a) Should using just some current limiting resistors be enough?
b) Can I use 74-series logic gates instead of resistors?
Between options a and b above, what route should I choose?
For a reliable 115200 baud rate connection, will the switching frequency of a
74HC08AND gate suffice to be incorporated?
EDIT: I'm well aware of other well-suited protocols such as SPI and I2C. There's a reason I'm using UART, and that's because the optiboot bootloader which my master uses communicates over UART, albeit UART s obvious limitations.
Also, while daisy-chaining is certainly a smart approach, by breaking rule 4, it also breaks Arduino bootloader functionality.
The devices could also be USB-to-Serial chips, and using SPI-to-USB or I2C-to-USB would not be feasible in this project.
So, I'd appreciate if you could focus on the 6 questions listed here instead, and share your UART knowledge. :)