Multi-drop RS-485 Questions

Anyone work with multi-drop RS-485?

Do I need a new library, or does it look like RS-232?

Any wiring hints? I’m using 4-wire.


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
/ \ | __ ) | ~Jeffrey Jordan jordanj@abc-naco.com
/ | \ | _ ( Phone: (610)630-2330x216 jljordan@wans.net
/ ++ \ | ) (
Fax: (610)630-2323
|
| |||/_| 2550 Blvd. o/t Generals, Norristown PA 19403
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

It basically is RS-232 except it uses balanced pairs for tx and rx. If
you are using a master slave, then the master can leave it’s outgoing TX
lines on all the time.
The slaves will need to enable and disable the transmitter driver when
done transmitting. Watch out for chopping the end bits of your message
off by disabling the driver before the tx buffer has finished sending.

Jeffrey O L Jordan wrote:

Anyone work with multi-drop RS-485?

Do I need a new library, or does it look like RS-232?

Any wiring hints? I’m using 4-wire.


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
/ \ | __ ) | ~Jeffrey Jordan > jordanj@abc-naco.com
/ | \ | _ ( Phone: (610)630-2330x216 > jljordan@wans.net
/ ++ \ | ) (
Fax: (610)630-2323
|
| |||/_| 2550 Blvd. o/t Generals, Norristown PA 19403
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

“Dave Allamby” <allambyjdx@cyradisx.com> wrote in message
news:3BB27CD2.8C210ED3@cyradisx.com

It basically is RS-232 except it uses balanced pairs for tx and rx. If
you are using a master slave, then the master can leave it’s outgoing TX
lines on all the time.

This is only true if you are working full-duplex and have separate Tx & Rx
pairs (as you are). If you are working half-duplex i.e. bi-directional
communication over the same pair of wires, then all units will need control
over their Tx Enable.

The slaves will need to enable and disable the transmitter driver when
done transmitting. Watch out for chopping the end bits of your message
off by disabling the driver before the tx buffer has finished sending.

The other point to watch out for is to make sure there are biasing resistors
on the line so that they default to a zero state when no unit is
transmitting. Oh, and make sure there are termination resistors on each end
of the line. (I speak from hard earned practical experience)

Jeffrey O L Jordan wrote:

Anyone work with multi-drop RS-485?

Do I need a new library, or does it look like RS-232?

Any wiring hints? I’m using 4-wire.


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
/ \ | __ ) | ~Jeffrey Jordan > jordanj@abc-naco.com
/ | \ | _ ( Phone: (610)630-2330x216 > jljordan@wans.net
/ ++ \ | ) (
Fax: (610)630-2323
|
| |||/_| 2550 Blvd. o/t Generals, Norristown PA 19403
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

In article <9oum62$3uj$1@inn.qnx.com>, jim@dramatec.co.uk says…

“Dave Allamby” <> allambyjdx@cyradisx.com> > wrote in message
news:> 3BB27CD2.8C210ED3@cyradisx.com> …
It basically is RS-232 except it uses balanced pairs for tx and rx. If
you are using a master slave, then the master can leave it’s outgoing TX
lines on all the time.

This is only true if you are working full-duplex and have separate Tx & Rx
pairs (as you are). If you are working half-duplex i.e. bi-directional
communication over the same pair of wires, then all units will need control
over their Tx Enable.

The slaves will need to enable and disable the transmitter driver when
done transmitting. Watch out for chopping the end bits of your message
off by disabling the driver before the tx buffer has finished sending.

The other point to watch out for is to make sure there are biasing resistors
on the line so that they default to a zero state when no unit is
transmitting. Oh, and make sure there are termination resistors on each end
of the line. (I speak from hard earned practical experience)

I agree wholeheartedly! (Also from hard earned practical experiences)
There are some RS-485 transceivers that have built-in biasing, so that
you do not need as many external components.

Jeffrey O L Jordan wrote:

Anyone work with multi-drop RS-485?

Do I need a new library, or does it look like RS-232?

Any wiring hints? I’m using 4-wire.


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
/ \ | __ ) | ~Jeffrey Jordan > jordanj@abc-naco.com
/ | \ | _ ( Phone: (610)630-2330x216 > jljordan@wans.net
/ ++ \ | ) (
Fax: (610)630-2323
|
| |||/_| 2550 Blvd. o/t Generals, Norristown PA 19403
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

\


Stephen Munnings
Software Developer
Corman Technologies Inc.

Somehow I missed the first message of the thread, go figure.

We use a 2-wire 485, but drivers will work for 4-wire as well. To prevent
chopping off the last few bits we modified the standard serial driver
to hold the RTS (in our case that’s the Tx enable) line until the last
bit leaves the FIFO. Seems to work ok with our hardware. It allows us
to change BAUD rates without having to worry about a adjusting timers.

-Paul

Jim Douglas wrote:

“Dave Allamby” <> allambyjdx@cyradisx.com> > wrote in message
news:> 3BB27CD2.8C210ED3@cyradisx.com> …
It basically is RS-232 except it uses balanced pairs for tx and rx. If
you are using a master slave, then the master can leave it’s outgoing TX
lines on all the time.

This is only true if you are working full-duplex and have separate Tx & Rx
pairs (as you are). If you are working half-duplex i.e. bi-directional
communication over the same pair of wires, then all units will need control
over their Tx Enable.

The slaves will need to enable and disable the transmitter driver when
done transmitting. Watch out for chopping the end bits of your message
off by disabling the driver before the tx buffer has finished sending.

The other point to watch out for is to make sure there are biasing resistors
on the line so that they default to a zero state when no unit is
transmitting. Oh, and make sure there are termination resistors on each end
of the line. (I speak from hard earned practical experience)


Jeffrey O L Jordan wrote:

Anyone work with multi-drop RS-485?

Do I need a new library, or does it look like RS-232?

Thanks for the help!

I forgot about the terminating resistor. I’ve used RS-485 before, but
not
developed the code to talk over it. Only used drivers before.

Again, thanks a lot for the input.

~ Jeffrey

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
/ \ | __ ) | ~Jeffrey Jordan jordanj@abc-naco.com
/ | \ | _ ( Phone: (610)630-2330x216 jljordan@wans.net
/ ++ | ) (
Fax: (610)630-2323
|
| |||/_| 2550 Blvd. o/t Generals, Norristown PA 19403
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

“Paul N. Leonard” wrote:

Somehow I missed the first message of the thread, go figure.

We use a 2-wire 485, but drivers will work for 4-wire as well. To prevent
chopping off the last few bits we modified the standard serial driver
to hold the RTS (in our case that’s the Tx enable) line until the last
bit leaves the FIFO. Seems to work ok with our hardware. It allows us
to change BAUD rates without having to worry about a adjusting timers.

-Paul

Jim Douglas wrote:

“Dave Allamby” <> allambyjdx@cyradisx.com> > wrote in message
news:> 3BB27CD2.8C210ED3@cyradisx.com> …
It basically is RS-232 except it uses balanced pairs for tx and rx. If
you are using a master slave, then the master can leave it’s outgoing TX
lines on all the time.

This is only true if you are working full-duplex and have separate Tx & Rx
pairs (as you are). If you are working half-duplex i.e. bi-directional
communication over the same pair of wires, then all units will need control
over their Tx Enable.

The slaves will need to enable and disable the transmitter driver when
done transmitting. Watch out for chopping the end bits of your message
off by disabling the driver before the tx buffer has finished sending.

The other point to watch out for is to make sure there are biasing resistors
on the line so that they default to a zero state when no unit is
transmitting. Oh, and make sure there are termination resistors on each end
of the line. (I speak from hard earned practical experience)


Jeffrey O L Jordan wrote:

Anyone work with multi-drop RS-485?

Do I need a new library, or does it look like RS-232?

Previously, Paul N. Leonard wrote in qdn.public.qnx4.devtools:

Somehow I missed the first message of the thread, go figure.

We use a 2-wire 485, but drivers will work for 4-wire as well. To prevent
chopping off the last few bits we modified the standard serial driver
to hold the RTS (in our case that’s the Tx enable) line until the last
bit leaves the FIFO. Seems to work ok with our hardware. It allows us
to change BAUD rates without having to worry about a adjusting timers.
[…]

If you wire up your 485 xcvr so that the RX segment is always active, you can wait until the UART’s echo read succeeds before dropping RTS.

The real solution, of course, is to use an SCC like the z85230 which can automatically synchronize RTS to the end of a frame.

The standard PC 16550 really isn’t suitable for driving a serial bus of any sort, and should be avoided at all costs.


Cheers - Tony ‘Nicoya’ Mantler :slight_smile:


Tony Mantler | Proud ---- Days since the last
QNX Consulting | of our | 16 |
tony@astra.mb.ca | Record ---- “Gerbil Incident”