Sign in

Not a member? | Forgot your Password?

Search Comp.Arch.Embedded

Search tips

Free PDF Downloads

Advanced Linux Programming

What Every Programmer Should Know About Memory

Introduction to Embedded Systems

C++ Tutorial

Embedded Systems - Theory and Design Methodology

Microcontroller Programming and Interfacing

Introduction to Microcontrollers


More Free PDF Downloads

Recent Blogs on EmbeddedRelated

Second-Order Systems, Part I: Boing!!
posted by Jason Sachs


Ada - 7 Segments and Catching Errors
posted by Mike Silva


Project Directory Organization
posted by Stephen Friederichs


OOKLONE: a cheap RF 433.92MHz OOK frame cloner
posted by Fabien Le Mentec


Practical protection against dust and water (i.e. IP protection)
posted by Dr Cagri Tanriover


Introduction to Microcontrollers

1 - Beginnings

2 - Further Beginnings

3 - Hello World

4 - More On GPIO

5 - Interrupts

6 - More On Interrupts

7 - Timers

8 - Adding Some Real-World Hardware

9 - More Timers and Displays

10 - Buttons and Bouncing

11 - Button Matrix & Auto Repeating

12 - Driving WS2812 RGB LEDs

13 - 7-segment displays & Multiplexing

See Also

ElectronicsDSPFPGA

Discussion Groups | Comp.Arch.Embedded | Splitting a serial (RS232) port signal?

There are 13 messages in this thread.

You are currently looking at messages 1 to 10.


So far in November, you have voted 0 times ou of a total of 0 votes by the community.
Please help us clean the archives from unuseful discussion threads by using the voting system! Details here.

Splitting a serial (RS232) port signal? - ElderUberGeek - 2007-03-09 13:21:00

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!


Re: Splitting a serial (RS232) port signal? - Jim Stewart - 2007-03-09 14:36:00

ElderUberGeek wrote:

> 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.

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.












Re: Splitting a serial (RS232) port signal? - Don McKenzie - 2007-03-09 15:19:00

ElderUberGeek wrote:

> 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.

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

can you add a uart?

Don...


-- 
Don McKenzie
E-Mail Contact Page:               http://www.dontronics.com/e-mail.html

Crystal clear, super bright OLED LCD (128x128) for your microcontroller.
Simple serial RX/TX interface. Many memory sizes.
http://www.dontronics-shop.com/product.php?productid460

No More Damn Spam: http://www.wizard-of-oz.com

Re: Splitting a serial (RS232) port signal? - andrew queisser - 2007-03-09 16:26:00

"ElderUberGeek" <a...@gmail.com> wrote in message 
news:1...@t69g2000cwt.googlegroups.com...
>
> 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!
>
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:

http://www.blackbox.com/Catalog/Category.aspx?cid81,1451,1460

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.

Andrew



Re: Splitting a serial (RS232) port signal? - jetq88 - 2007-03-09 16:54:00

On Mar 9, 12:21 pm, "ElderUberGeek" <aribl...@gmail.com> wrote:
> 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!

is there any other port like USB port or Parallel port or ethernet
port you can you use? if you go, they there is box to convert them to
RS232, this is simple way. if you dont, and your platform isn't
windows, you have to have the ability to pad the message from appA or
appB(for example, app was designed by your team), then definetely you
can design a box to do this conversion.

jet


Re: Splitting a serial (RS232) port signal? - Mark Walsh - 2007-03-09 17:10:00

"ElderUberGeek" <a...@gmail.com> wrote in message 
news:1...@t69g2000cwt.googlegroups.com...
>
> 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!
>

There is a device called the RS-232 hub that works well for half duplex 
protocols like Modbus.  It has been used on oil and gas wells where two 
different devices that only had RS232 ports available need to share a radio. 
Commands come over the  radio and go to both PLC's.  When the one with the 
correct Modbus address responds, it goes out the radio and to the other PLC 
which again ignores it.

Basically the first port that talks is the master as long as it is talking 
and the other two are slaves until it stops.  Then the port that grabs it 
next is master while it talks.  It's easier than custom protocols or 
converting everything to RS485 and back again.

More info at

https://rawiq.com/store/


Mark Walsh




Re: Splitting a serial (RS232) port signal? - Jonathan Kirwan - 2007-03-09 17:14:00

On Fri, 09 Mar 2007 11:36:33 -0800, Jim Stewart <j...@jkmicro.com>
wrote:

><snip>
> 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.
><snip>

I think the rest of your post was on-target, but this misses what I
think the OP implied...  that the two external devices probably aren't
software-modifiable.  If you read closely, the OP is talking about
some intermediate device that would accept headers and split off the
communication to the two devices, with the implication that the header
is removed in the process, I think.  The Tx going both ways will
probably be an issue, though it is probably fine from a hardware point
of view.

Jon

Re: Splitting a serial (RS232) port signal? - Jonathan Kirwan - 2007-03-09 17:22:00

On Fri, 09 Mar 2007 22:14:24 GMT, Jonathan Kirwan
<j...@easystreet.com> wrote:

>On Fri, 09 Mar 2007 11:36:33 -0800, Jim Stewart <j...@jkmicro.com>
>wrote:
>
>><snip>
>> 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.
>><snip>
>
>I think the rest of your post was on-target, but this misses what I
>think the OP implied...  that the two external devices probably aren't
>software-modifiable.  If you read closely, the OP is talking about
>some intermediate device that would accept headers and split off the
>communication to the two devices, with the implication that the header
>is removed in the process, I think.  The Tx going both ways will
>probably be an issue, though it is probably fine from a hardware point
>of view.

Just to make my point further, if it were possible for the OP to
modify the software in the devices, the OP could simply wire things
this way:

>                               +----------+
>                          ,----| rx       |
>  +--------------------+  |    |     DV1  |
>  |                 tx |--' ,--| tx       |
>  |  Application       |    |  +----------+
>  |      Box           |    |
>  |                 rx |--, |  +----------+
>  +--------------------+  | '--| rx       |
>                          |    |     DV2  |
>                          '----| tx       |
>                               +----------+

And simply have DV1 pass on to DV2 any messages it doesn't parse for
itself.

However, I don't think modifying the devices in on the table from what
I read.  This also means that MODBUS is out of the question, if I
gather this right.

Jon

Re: Splitting a serial (RS232) port signal? - Jonathan Kirwan - 2007-03-09 17:25:00

On 9 Mar 2007 10:21:41 -0800, "ElderUberGeek" <a...@gmail.com>
wrote:

>
>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----
><snip>

I am assuming that you can modify the COM1 driver for your application
box but that you cannot modify the software on your two other devices,
there.

How many pins on the COM1 port are there, other than the obvious TX,
RX, and ground, that you can control from the COM1 driver software? Do
you have RTS, CTS, DTR, and/or DSR, with say one or two of these as
outputs you can set one way or another?  What speed?  Are both devices
at the same rate or can be set to the same rate?

Jon

Re: Splitting a serial (RS232) port signal? - Jonathan Kirwan - 2007-03-09 17:26:00

On Fri, 09 Mar 2007 22:22:08 GMT, Jonathan Kirwan
<j...@easystreet.com> wrote:

>...in on the table...

...is on the table...

| 1 | |