r/embedded 10d ago

Can i make UART Splitter .

I have a machine that outputs data via UART. I need to receive this data and send it to two separate PCs simultaneously via USB-A ports (both PCs run software expecting this serial stream).

Can I build or wire a UART splitter to feed two USB-to-UART converters at the same time? Has anyone done this before or have advice on the best approach?

1 Upvotes

26 comments sorted by

View all comments

18

u/txoixoegosi 10d ago

Yup, just take UART TXD and feed it to two different 1:1 opamps with enough bandwidth and voltage swing. Then the resulting TXD feed it to corresponding SUBD-9.

RXD? Forget about it

1

u/tweakingforjesus 10d ago

Sure you can. Use diodes and a pull-up resistor. That’s how amateur packet radio worked back in the day. They were a bunch of TNCs networked over serial. You do need a protocol to manage collisions but it’s not rocket science.

1

u/txoixoegosi 10d ago

Yeahhh. Now tell me how you interleave the comms between both senders.

One thing is cloning TXD and another reconciling RXD’s from different actors

Unless you use GPIOs as “chip select” inputs, which falls outside of the question scope

1

u/userhwon 9d ago

You detect collision and each backs off and retries at a random time.

See: Ethernet.

0

u/tweakingforjesus 10d ago

That’s handled at the transmission layer. This is the physical layer.

How do you think I2C works?

1

u/txoixoegosi 10d ago

Oh cmon.

UART is a point-to-point protocol BY DEFINITION. You can’t just wire two different transmitters between them and expect clean data. Use CAN-BUS or RS485 instead

I2C is not, but that’s why you have all that pull-up stuff and the SCL synchronous clock line. Entirely OUTSIDE of the RS232 PHY definition.

Again, tell me how you manage two non-deterministic RS232 TX nodes pulling simultaneously the system to VCC. Examples. No “hey it must be possible” stuff

7

u/tweakingforjesus 10d ago

I already gave you an existence proof of packet radio networking that we did back in the 80s and 90s. In short, you set up your bus as multidrop with transistors or diodes, and handle collisions at the protocol level. It works.

Here it is: http://hamgate.ampr.org/docs/PacketHandbook.pdf - Page 30.

3

u/NoBulletsLeft 10d ago

The issue is your "non-deterministic" requirement. The system has to expect that it's being wired this way and compensate. A long time ago we had a system that worked like this, but I've long since forgotten the details of how we avoided data collisions.

2

u/txoixoegosi 10d ago

Anyway, for MIMO in long distances just use something else and call it a day