From: Russell King <rmk@arm.linux.org.uk>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Chris Fowler <cfowler@outpostsentinel.com>,
Robert White <rwhite@casabyte.com>, Ed Vance <EdV@macrolink.com>,
"'Linux PPP'" <linuxppp@indiainfo.com>,
linux-serial@vger.kernel.org,
"'linux-kernel'" <linux-kernel@vger.kernel.org>
Subject: Re: RS485 communication
Date: Sun, 16 Mar 2003 10:35:18 +0000 [thread overview]
Message-ID: <20030316103517.B14404@flint.arm.linux.org.uk> (raw)
In-Reply-To: <1047809131.22070.33.camel@imladris.demon.co.uk>; from dwmw2@infradead.org on Sun, Mar 16, 2003 at 10:05:31AM +0000
On Sun, Mar 16, 2003 at 10:05:31AM +0000, David Woodhouse wrote:
> Note you don't need any separate lines for this. If someone else is
> transmitting a zero while you are also transmitting a zero, that's fine
> and you didn't stomp on each other. If someone else is transmitting a
> zero while you are transmitting a one, you won and a one was
> transmitted, and they back off. If they transmit a one while you
> transmit a zero, then they won :)
No - that's not how RS485 works. With a balanced line, the result
that any one receiver will see will depend on it's position on the
line and the relative distance to each transmitter, the resistance
of the line, and the manufacturer/type of the RS485 transceiver.
In other words, the state you see is indeterminent.
Also, a correctly terminated RS485 has no way to tell if someone is
transmitting other than yourself receiving characters since the
termination resistors bias the line into the mark state.
If you don't have a correctly biased RS485 line, you can end up with
framing errors with validly transmitted data, and given the right
data pattern, it could be an undetectable without checksums and the
like. What's worse is that this type of error can occur each time
you retransmit. Naturally, there are certain tricks you can pull to
ensure that the receiver is properly synchronised before you transmit
real data.
Been there, seen the problem, diagnosed it, and modified embedded
software on both master and slave ends to work around it. After
you've dealt with equipment with 20 RS485 buses internally with up
to 50 transceivers on a line, and around 50 RS485 buses running
around large buildings to various sensors, you end up understanding
some of these problems fairly well. 8/
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
next prev parent reply other threads:[~2003-03-16 10:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-13 16:56 RS485 communicatio Ed Vance
2003-03-13 17:46 ` Richard B. Johnson
2003-03-13 22:54 ` RS485 communication Robert White
2003-03-13 23:30 ` Chris Fowler
2003-03-15 8:07 ` Robert White
2003-03-15 15:42 ` Chris Fowler
2003-03-15 12:46 ` David Woodhouse
2003-03-16 0:56 ` Alan Cox
2003-03-16 10:05 ` David Woodhouse
2003-03-16 10:35 ` Russell King [this message]
2003-03-16 10:51 ` David Woodhouse
2003-03-15 19:46 ` RS485 communicatio Pavel Machek
2003-03-16 19:57 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2003-03-17 5:41 RS485 communication Cigol C
2003-03-20 23:09 ` Robert White
2003-03-20 23:17 ` Chris Fowler
2003-03-21 2:48 ` Robert White
2003-03-24 11:43 Cigol C
2003-03-25 3:23 ` Paul Mackerras
[not found] <20030324143723.11625.qmail@indiainfo.com>
2003-03-24 16:41 ` Joachim Franek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030316103517.B14404@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=EdV@macrolink.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=cfowler@outpostsentinel.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linuxppp@indiainfo.com \
--cc=rwhite@casabyte.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox