Searching \ for '[EE] RS232 multiplexing' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/serials.htm?key=rs232
Search entire site for: 'RS232 multiplexing'.

Exact match. Not showing close matches.
PICList Thread
'[EE] RS232 multiplexing'
2006\04\22@212952 by Vic Fraenckel

flavicon
face
I need to multiplex one RS232 serial port to one of four RS232 ports. Can this be done? Can a TTL Serial port be multiplexed to 4 TTL Serial ports? Some TTL devices require inverted signals and some do not. How would I handle this? Standard Baud rates to a minimum of 9600. Computer control of port selection.

I want to build this my self not purchase an off-the-shelf solution.

Any enlightenment will be appreciated.

Vic
________________________________________________________

Victor Fraenckel - The Windman        
victorf ATSIGN windreader DOT com
KC2GUI                                                  

     Home of the WindReader Electronic Theodolite
                              Read the WIND

"Dost thou not know, my son, with how little wisdom the world is governed?"
-Count Oxenstierna (ca 1620) to the young King Gustavus Adolphus

"People sleep peacefully in their beds at night only because rough
men stand ready to do violence on their behalf."
-George Orwell

"When a true genius appears in the world you may know him by this sign: that
all the dunces are in confederacy against him."   -Jonathan Swift

2006\04\22@221648 by blackcat

face picon face
I am interpreting this as a 5 unit multi-drop network.
One unit will be master and the other three will be slaves.
One simple approach would be to select 5V as the marking ( idling  
condition )
and zero volts as the space ( start ) condition.
All of the units shall tri-state their output or the output can be  
open-collector.
In either case you will want a pull-up resistor to 5 V.
The master queries one of the 4 slaves and then waits for an answer.
The master can send a break condition to reset the network.

The devil is in the details, however.  this answer will provoke more  
questions than
it answers.  Victor, your response will determine what the details  
will be.

Gus



On 2006-Apr 22, at 7:27 PM, Vic Fraenckel wrote:

I need to multiplex one RS232 serial port to one of four RS232 ports.  
Can this be done? Can a TTL Serial port be multiplexed to 4 TTL  
Serial ports? Some TTL devices require inverted signals and some do  
not. How would I handle this? Standard Baud rates to a minimum of  
9600. Computer control of port selection.

I want to build this my self not purchase an off-the-shelf solution.

Any enlightenment will be appreciated.

Vic
________________________________________________________

Victor Fraenckel - The Windman
victorf ATSIGN windreader DOT com
KC2GUI

      Home of the WindReader Electronic Theodolite
                               Read the WIND

"Dost thou not know, my son, with how little wisdom the world is  
governed?"
-Count Oxenstierna (ca 1620) to the young King Gustavus Adolphus

"People sleep peacefully in their beds at night only because rough
men stand ready to do violence on their behalf."
-George Orwell

"When a true genius appears in the world you may know him by this  
sign: that
all the dunces are in confederacy against him."   -Jonathan Swift

2006\04\23@005933 by Harold Hallikainen

face picon face

> I am interpreting this as a 5 unit multi-drop network.
> One unit will be master and the other three will be slaves.
> One simple approach would be to select 5V as the marking ( idling
> condition )
> and zero volts as the space ( start ) condition.
> All of the units shall tri-state their output or the output can be
> open-collector.
> In either case you will want a pull-up resistor to 5 V.
> The master queries one of the 4 slaves and then waits for an answer.
> The master can send a break condition to reset the network.
>
> The devil is in the details, however.  this answer will provoke more
> questions than
> it answers.  Victor, your response will determine what the details
> will be.
>
> Gus

I've done a couple systems like this. One is for communication between two
PICs in a dental curing light. This was the "open collector" bus, as
described above. To get the "open collector" transmit output from the PIC
UART, I just put a diode from the output pin to the bus with the cathode
of the diode at the outpt pin. Any transmitter on the bus can pull the bus
low. The pull-up resistor pulls the bus high. All receiver inputs are on
the bus. A master polls the other devices. I used a simple packet format
that included a start of packet sequence (like 0xaa55), a TO address, a
FROM address, a packet type, a data count, the data, and a checksum.

In another system (battery monitor for electric car), each PIC was across
a battery in a large series string (something like 180VDC). Here, the PIC
sends a short packet to the LED of an opto isolator. The opto has a
phototransistor. We run a two wire open collector bus between all these
phototransistors on the optos. The master unit has a pull-up resistor and
receives data off the bus. This is a one way system with no anti-collision
method. We get collissions now and then, but these cause the checksum to
fail, so the packet is thrown out. The system does not require every
packet to be received. The fact that the packets are very short and are
not sent very frequently keeps the number of collisions to a minimum.

Good luck!

Harold


--
FCC Rules Updated Daily at http://www.hallikainen.com

2006\04\23@012534 by Rich Graziano

picon face
You can always invert a TTL signal easily, if that is the approach you want
to take.
----- Original Message -----
From: "Vic Fraenckel" <spam_OUTvictorfTakeThisOuTspamwindreader.com>
To: "PICMIT" <.....piclistKILLspamspam@spam@mit.edu>
Sent: Saturday, April 22, 2006 9:27 PM
Subject: [EE] RS232 multiplexing


{Quote hidden}

> --

2006\04\24@000056 by Sergey Dryga
face picon face
Vic Fraenckel <victorf <at> windreader.com> writes:

>
> I need to multiplex one RS232 serial port to one of four RS232 ports. Can
this be done? Can a TTL Serial port be
> multiplexed to 4 TTL Serial ports? Some TTL devices require inverted signals
and some do not. How would I
> handle this? Standard Baud rates to a minimum of 9600. Computer control of
port selection.
Vic,
If I understand correctly your problem, you need to communicate to 4 different
ports (sort of different networks).  To do this I would suggest a demultiplexer
chip, something like 74LS139.

Sergey

2006\04\24@025409 by Tinggo S, ST

flavicon
face
part 1 1675 bytes content-type:text/plain; charset="windows-1252" (decoded quoted-printable)

Use 4 pcs of 9pins SPST Relay for selecting the COM port U want to Connect with.
Or maybe U can use 10 pcs of Analog Switch CD/MC 4066. Each pcs containts 4 switches with 4 controls.

Best Regards.        
 Tinggo Santoso, ST
Perum. Wisma Mukti
Jl.Klampis Anom F32 III/22
031 6024 8951
081 231 53035
tnet232tnet232spamKILLspamyahoo.com">http://www.geocities.com/.....tnet232tnet232KILLspamspam.....yahoo.com

{Quote hidden}

Chat, play and win big with Jackpotjoy Bingo! (go to: http://clk.tradedoubler.com/click?p=43819&a=1213347&g=16242928)

part 2 35 bytes content-type:text/plain; charset="us-ascii"
(decoded 7bit)

2006\04\24@060502 by Vic Fraenckel

flavicon
face
Sergey,

Thanks for taking the time to respond! You are correct, it is sort of a network in which various deviced can be communicated with.
 
I have examined your  approach and have built and tested a 4 port muliplexer based on the 74LS4052 which works to some extent. The problem I am having is that some  of the devices communicate with inverted TTL serial and the '4052 cannot handle this. Not being a electronics guru by any means, I am not sure how to handle this problem.

Any further enlightenment will  be appreciated.

Vic


________________________________________________________

Victor Fraenckel - The Windman        
victorf ATSIGN windreader DOT com
KC2GUI                                                  

2006\04\24@073457 by Gerhard Fiedler

picon face
Vic Fraenckel wrote:

> I have examined your  approach and have built and tested a 4 port
> muliplexer based on the 74LS4052 which works to some extent. The problem
> I am having is that some  of the devices communicate with inverted TTL
> serial and the '4052 cannot handle this.

Why would a 4052 not handle an inverted signal? It passes (or blocks) both
high and low states, and normally doesn't care whether that signal is
something inverted or not. What do you mean by "inverted"?

How is the UART handling this inverted signal? Can't you invert the signal
before switching if that's really the problem?

How about a quick diagram? To me, your problem sounds still fuzzy.

Gerhard

2006\04\24@092017 by Vic Fraenckel

flavicon
face
Gerhard,

First I confess that I am no electronics guru so I may be "fuzzy " because I do not speak electonicize fluently.

As I understand my problem, some devices which claim to be TTL Serial devices send/receive their data in inverted which to me means that 0 volts is the idle voltage and the data is negative volts. Perhaps this is a naive viewpoint, but it is what I understand. Others send/receive non-inverted TTL. My next experiment is to design into my multiplexer a way to change the inverted signal to a non-inverted signal, perhaps using a section of a quad not 7404 to do the job.

I apologize if I am not being clear.

Vic


________________________________________________________

Victor Fraenckel - The Windman        
victorf ATSIGN windreader DOT com
KC2GUI                                                  

2006\04\24@094412 by Sergey Dryga

face picon face
Vic Fraenckel <victorf <at> windreader.com> writes:

>
> Sergey,
>
> Thanks for taking the time to respond! You are correct, it is sort of a
network in which various deviced can be
> communicated with.
>
> I have examined your  approach and have built and tested a 4 port muliplexer
based on the 74LS4052 which works
> to some extent. The problem I am having is that some  of the devices
communicate with inverted TTL serial and
> the '4052 cannot handle this. Not being a electronics guru by any means, I am
not sure how to handle this
> problem.
>
> Any further enlightenment will  be appreciated.
>
> Vic
>

Vic,

I do not quite understand the problem with inverted signal and '4052.  It
should handle any signal +/- 5V (according to datasheet).  Please describe more
symptoms and send a circuit diagram if possible.

Sergey




2006\04\24@102934 by David VanHorn

picon face
The term "Inverted" is fuzzy.

Most (all?) devices intended to communicate by RS-232 using a UART, USART or
anything similar, output what could be called "inverted" logic.   If you do
your interfacing at the TTL level then your devices will all talk just fine.



--
Feel the power of the dark side!  Atmel AVR

2006\04\24@105603 by Bill & Pookie

picon face
Would be interesting to use a low end pic to be the multiplier.  Ignore the
uart and interrupts on the pic.  Simply program it to be a "monkey see,
monkey do" device.  Sees level on one line, pass level to other lines.  The
level shifting could be done in software.  And a auto configuration
function could be implemented by seeing what levels are received from
devices when nothing being transmitted.  But main thing is not to read the
data, just pass along the levels.

Bill

{Original Message removed}

2006\04\24@113109 by Alan B. Pearce

face picon face
>I do not quite understand the problem with inverted
>signal and '4052.  It should handle any signal +/- 5V
>(according to datasheet).  Please describe more
>symptoms and send a circuit diagram if possible.

The problem is the OP is getting mixed up between signal level inversion and
logic inversion.

When the TTL signal is "inverted", the voltage still goes between 0 and 5V,
but the sense of the logic is inverted - i.e. +5V = logic 0, 0V = logic 1.

2006\04\24@114922 by David VanHorn

picon face
>
>
> The problem is the OP is getting mixed up between signal level inversion
> and logic inversion.
>
> When the TTL signal is "inverted", the voltage still goes between 0 and
> 5V,
> but the sense of the logic is inverted - i.e. +5V = logic 0, 0V = logic 1.



Yes, probably.  You can think of it in a mathematical sense.
Assume that all the devices are using uarts or similar.
The uarts will all talk TTL, and "mark" will be either a high or a low, it
dosen't really matter.  Point is, at this level, if you connect them
properly they will talk.

Now you can run the signals from one device through level conversion, or
logic inversion, and you can see that as a function applied to the signal.
In order to have that signal readable by the other device, you have to un-do
that function (apply the inverse).

If you level shifted the TTL outputs to RS-232 levels, then you need to
level shift them back to TTL levels.  If you inverted the sense of the
signals, then you need to re-invert that sense.  All common 232 interface
chips actually do both, level conversion and logical inversion, in the sense
that a TTL high input produces a zero or negative voltage on the output.

Multiplexing things at RS-232 levels is more difficult, but can be done.
I'd prefer to convert everything to TTL, and then deal with it as just
signals that need routing.


--
> Feel the power of the dark side!  Atmel AVR

2006\04\24@122953 by Steve Smith

flavicon
face
Or a single 4053 (2 x 4 to 1 analogue switch) but beware these need a -ve
supply voltage as well.
Rgds
Steve

{Original Message removed}

2006\04\24@124726 by David VanHorn

picon face
On 4/24/06, Steve Smith <@spam@xygaxKILLspamspamblueyonder.co.uk> wrote:
>
> Or a single 4053 (2 x 4 to 1 analogue switch) but beware these need a -ve
> supply voltage as well.
> Rgds


And protection against 232 spikes and levels that exceed their rails.
And ESD protection.
And does inserting that switch's on resistance cause you not to be able to
drive a full-spec 232 load?



Feel the power of the dark side!  Atmel AVR

2006\04\24@125358 by D. Jay Newman

flavicon
face
> The term "Inverted" is fuzzy.
>
> Most (all?) devices intended to communicate by RS-232 using a UART, USART or
> anything similar, output what could be called "inverted" logic.   If you do
> your interfacing at the TTL level then your devices will all talk just fine.

Except for a few odd devices that use non-inverted logic; an example is
the Maxbotics sonar. And he developed this without even thinking about
modern standards.

Normal TTL level asynchronous serial (that which is output from a UART)
is inverted. That is, a logic 0 = 5V and a logic 1 = 0V.

I'm sure that there is a rational historical reason for this, but I can't
think of one. I just live with it.
--
D. Jay Newman           ! Author of:
KILLspamjayKILLspamspamsprucegrove.com     ! _Linux Robotics: Building Smarter Robots_
http://enerd.ws/robots/ ! "Heros aren't made, they're cornered."

2006\04\24@132656 by David VanHorn

picon face
On 4/24/06, D. Jay Newman <RemoveMEjayTakeThisOuTspamsprucegrove.com> wrote:

> > The term "Inverted" is fuzzy.
> >
> > Most (all?) devices intended to communicate by RS-232 using a UART,
> USART or
> > anything similar, output what could be called "inverted" logic.   If you
> do
> > your interfacing at the TTL level then your devices will all talk just
> fine.
>
> Except for a few odd devices that use non-inverted logic; an example is
> the Maxbotics sonar. And he developed this without even thinking about
> modern standards.


Well, that's icky.. So you'd have to run this through inverters like an '04
or '14 gate, then into the common max232-type level converter/inverters.



> Normal TTL level asynchronous serial (that which is output from a UART) is
> inverted. That is, a logic 0 = 5V and a logic 1 = 0V.


Err.. That's mark and space.   1 is always 5V, and 0 is always 0V
I don't remember wether uarts idle marking or spacing, I'd have to go look
it up. As long as you follow the standards, it dosen't really matter at the
software level.



> I'm sure that there is a rational historical reason for this, but I can't
> think of one. I just live with it.


Yup.



> --
> Feel the power of the dark side!  Atmel AVR

2006\04\24@135719 by D. Jay Newman

flavicon
face
> On 4/24/06, D. Jay Newman <spamBeGonejayspamBeGonespamsprucegrove.com> wrote:

> > Except for a few odd devices that use non-inverted logic; an example is
> > the Maxbotics sonar. And he developed this without even thinking about
> > modern standards.
>
> Well, that's icky.. So you'd have to run this through inverters like an '04
> or '14 gate, then into the common max232-type level converter/inverters.

Yes, but you can hook it up to a PC with a single transitor.

Also he has two other communications methods (analog voltage and a PWM
output) so the reversed serial isn't much of a problem.

> > Normal TTL level asynchronous serial (that which is output from a UART) is
> > inverted. That is, a logic 0 = 5V and a logic 1 = 0V.
>
> Err.. That's mark and space.   1 is always 5V, and 0 is always 0V

You may want to check that out on a 'scope. I may be using odd terminology
but for asynch serial the TTL levels are inverted in meaning.

> I don't remember wether uarts idle marking or spacing, I'd have to go look
> it up. As long as you follow the standards, it dosen't really matter at the
> software level.

Unless you roll your own rather than using built-in hardware.

Also several microcontrollers have the ability to automatically invert
the levels of their asynch serial lines. The IsoPod and their ilk can
do this.
--
D. Jay Newman           ! Author of:
TakeThisOuTjayEraseMEspamspam_OUTsprucegrove.com     ! _Linux Robotics: Building Smarter Robots_
http://enerd.ws/robots/ ! "Heros aren't made, they're cornered."

2006\04\24@142531 by Steve Smith

flavicon
face
No no no daft idea use the 4053 between the pic and the max232's no issues
then needs 2 digital lines for selection and you can scavenge the Vee from
the max charge pump

Steve (with a better explanation this time)

{Original Message removed}

2006\04\24@150227 by David VanHorn

picon face
>
>
> Yes, but you can hook it up to a PC with a single transitor.


You can do that anyway. A transistor inverts the sense, just like a max232
does.


> > > Normal TTL level asynchronous serial (that which is output from a
> UART) is
> > > inverted. That is, a logic 0 = 5V and a logic 1 = 0V.
> >
> > Err.. That's mark and space.   1 is always 5V, and 0 is always 0V
>
> You may want to check that out on a 'scope. I may be using odd terminology
> but for asynch serial the TTL levels are inverted in meaning.


Yes, but the logic levels are still "1" and "0".
http://www.beyondlogic.org/serial/serial.htm
On the 232 side, Space = 0 = +3-+25V
On the TTL side, space = 1 = logic high.

www.du.edu/~etuttle/electron/elect55.htm
It idles in mark, apparently.

{Quote hidden}

> -

2006\04\24@150416 by David VanHorn

picon face
On 4/24/06, Steve Smith <xygaxEraseMEspam.....blueyonder.co.uk> wrote:
>
> No no no daft idea use the 4053 between the pic and the max232's no issues
> then needs 2 digital lines for selection and you can scavenge the Vee from
> the max charge pump
>
> Steve (with a better explanation this time)


If you're doing it at logic levels, then VEE can be tird to GND.
And you can use TTL/Cmos multiplexer (1 of N) chips, rather than analog
gates.
Hell, you could even use an EPROM for this!


--
> Feel the power of the dark side!  Atmel AVR

2006\04\24@162842 by Gerhard Fiedler

picon face
Vic Fraenckel wrote:

> First I confess that I am no electronics guru so I may be "fuzzy "
> because I do not speak electonicize fluently.

Ok... that's not a problem. That's why I asked for some sort of diagram.
This helps bridging the "electronese gap" :)

There's been a number of messages on this thread, but to be honest, I don't
have a clue what exactly your problem is. This is due to your problem not
having been described clearly. Before we get to any solutions, we need to
have that.

> As I understand my problem, some devices which claim to be TTL Serial
> devices send/receive their data in inverted which to me means that 0
> volts is the idle voltage and the data is negative volts. Perhaps this
> is a naive viewpoint, but it is what I understand. Others send/receive
> non-inverted TTL. My next experiment is to design into my multiplexer a
> way to change the inverted signal to a non-inverted signal, perhaps
> using a section of a quad not 7404 to do the job.

Given that, I still don't know what you want to do. You said you wanted to
hook up one RS232 device to four other RS232 devices. Right? What are each
of these five devices? Do you only have external access to the RS232
signals, or do you have only (usually internal) access to the logic level
UART signals, or do you have access to both? Do you have access to the
firmware of the one device that should communicate with the other four?
What kind of protocols are being used for the communication for each of the
four devices? Do you have the protocol description, or at least a rough
idea?

These are just a few questions to get you started... all this is
potentially decisive for an answer.

Gerhard

More... (looser matching)
- Last day of these posts
- In 2006 , 2007 only
- Today
- New search...