Splitting a serial (RS232) port signal?

I have a hardware platform that only have one serial port (COM1, a RS232 port) available, but I need to connect to two devices. The following diagram shows how A and application B want to talk to device Ad and device Bd respectively (over the single COM port).

App A---- | |---- COM1A------ Device Ad COM1---- SPLITTER---- | |---- COM1B------ Device Bd App B----

So, I though of creating a small splitter device that would know how to split and combine data and send it to the right port. Meaning, data from AppA would end up on COM1A for device Ad and data from AppB would end up on COM1B for device Bd.

I thought that to accomplish this I could prefix something to the message sent from each application which would act like a routing signal and the splitter would then look at it and send the message (minus the prefix) to the right port. Similarly, for data arriving over one of the split port, the splitter would add the prefix and send it back to the host, where it would again be looked at and routed to the correct application.

I hope this was clear and not confusing!

So...... my question is, is this a good way to accomplish this? Are their devices that do it? I did find references to "serial port splitters" but they were all for PC environment and all my devices are embedded boxes.

Thanks for your inputs!

Reply to
Loading thread data ...

Hams have been doing this for years, not that that establishes it as good practice (:

Just take the TX signal from your host and run it to both of your peripherals. As you said, you'll have to have some sort of header or protocol so that you can send packets to the one peripheral that will be ignored by the other.

For the 2 TX signals coming from the peripherals, put a diode in series with each. Point the anode toward the peripheral and tie the cathodes together. Connect the cathodes to the host RX line and also pull it to ground with a pulldown resistor, maybe 2.2k or so. It's called a wired- OR. Either signal can pull high but neither can pull low.

Now the reason this isn't a very good solution is that the signal into your host is not actively driven low. It's pulled low by the resistor. So you have to work out kind of an ugly compromise between fall time of your signal and loading of the outputs. Furthermore, the high-going signal will be .8 volts less than the actual outputs because of the voltage drop of the diodes. You might end up with a circuit that works fine today, but a year from now, when the purchasing department buys a different brand of RS-232 transceiver, it stops working.

Would I use it? If I were backed into a corner and I could limit the baudrate to 9600 or less, probably. Would I prefer to redesign it right? Yes.

Reply to
Jim Stewart

embedded boxes? based on a pc or a specific micro?

can you add a uart?


Don McKenzie
E-Mail Contact Page:               http://www.dontronics.com/e-mail.html
 Click to see the full signature
Reply to
Don McKenzie

I've seen just what you're describing in a catalog some time ago, complete with a virtual multi-com port driver for Windows (although it sounds like your app machine isn't a Windows box). I can't remember where I saw this but Black Box has some stuff that looks like what you're describing:

formatting link

Of course their stuff is pricey but if you can find a small micro with three UARTs or enough GPIO it should be easy to do this yourself, maybe even power it from the RS232 lines.


Reply to
andrew queisser

"ElderUberGeek" skrev i meddelandet news: snipped-for-privacy@p10g2000cwp.googlegroups.com...

From what I have seen, you have RXD,TXD out from your H/W. Do you have any sideband signals like RTS/CTS etc?

If not, you probably want to have a low cost micro.

There is already a standardized protocol for this: GSM 07.10 This allows you to multiplex a number of UART streams on top of the single RS-232 port you have.

If you take a micro with three UARTs like an AT91SAM7S321 you can connect the DBGU to your RS-232 port and the two standard UARTs with H/W RS-485 support to your peripherals.

The ARM micro can decode the GSM 07.10 (Google to find the standard documents) and split it up into the two streams. By using the larger AT91SAM7X128/256 you can connect peripheral 2 with Ethernet.

Best Regards,
Ulf Samuelsson
 Click to see the full signature
Reply to
Ulf Samuelsson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.