Searching \ for 'Multi-Master RS-485' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/io/serials.htm?key=rs%2D485
Search entire site for: 'Multi-Master RS-485'.

Truncated match.
PICList Thread
'Multi-Master RS-485'
1997\09\05@084319 by David Duffy

flavicon
picon face
I am thinking of using RS-485 for hooking together some home automation
bits which all can Tx & Rx. The Rx bit is easy but what if two or more
devices try to Tx at the same time ? Collission detection is obviously
required but am unsure of how to implement it on serial line. There will
be no "master" in the system so a polling arangement is out. I did have
the thought of when a collission is detected the unit could wait for the
line to clear then try again. As each unit will have a unique address, I
thought that I could use this as a variable for re-try timing to stop the
units clashing more than once each time. Does this make any sense ?
The serial data would be made up of 10-byte packets with header,crc & tail.
I think there would be plenty of uses for such a multi-drop framework.
Please tell me if I'm heading up that famous sh** creek !  :-)
rEGARDS.  Sorry... cOuLdN't hElP mYsElF !! (Yeah, I've been told already !)

______________________________________
Dave Duffy, Audio Visual Devices
8/9-11 Trade Street
Cleveland Qld 4163, Australia
Ph: +61 7 38210362 Fax: +61 7 38210281
E-mail: spam_OUTAVDTakeThisOuTspammailbox.uq.edu.au
______________________________________

1997\09\05@090813 by Andy Kunz

flavicon
face
Oh, a little more thoughts.

If every processor is actively watching the communications, it can detect
when an "ack" has been sent to the message originator, and follow it
immediately with it's own message, if it has something to send.

Token ring methodologies also work extremely well for this, especially when
you have a 9-bit capable USART such as is in a PIC or the MAX3100.

Andy

==================================================================
Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865
         Hardware & Software for Industry & R/C Hobbies
       "Go fast, turn right, and keep the wet side down!"
==================================================================

1997\09\05@090819 by Andy Kunz

flavicon
face
At 10:50 PM 9/5/97 +1000, you wrote:
>I am thinking of using RS-485 for hooking together some home automation

Have the receiver, if it doesn't receive a valid packet (as determined by
CRC, ChkSum, etc) reply with silence.  If the transmitter doesn't get back
an _addressed_ "ACK" signal, it times out and retries after a sorta-random
delay (say, based upon TMR0).  This would allow things to work reasonably
well.

Andy

==================================================================
Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865
         Hardware & Software for Industry & R/C Hobbies
       "Go fast, turn right, and keep the wet side down!"
==================================================================

1997\09\05@091847 by KcW

flavicon
face
I remember an article by JaN AxElSoN in MicroComputer journal on doing
exactly this with basic stamps, so it should be no problem. I'll dig up a
scan for you if you would like. As I remember it was a pretty good article
(as most of hers are).
KcW

1997\09\05@092657 by mikesmith_oz

flavicon
face
On  5 Sep 97 at 22:50, David Duffy wrote:

> I am thinking of using RS-485 for hooking together some home
> automation bits which all can Tx & Rx. The Rx bit is easy but what
> if two or more devices try to Tx at the same time ? Collission
> detection is obviously required but am unsure of how to implement it
> on serial line. There will be no "master" in the system so a polling
> arangement is out. I did have the thought of when a collission is
> detected the unit could wait for the line to clear then try again.
> As each unit will have a unique address, I thought that I could use
> this as a variable for re-try timing to stop the units clashing more
> than once each time. Does this make any sense ? The serial data
> would be made up of 10-byte packets with header,crc & tail. I think
> there would be plenty of uses for such a multi-drop framework.
> Please tell me if I'm heading up that famous sh** creek !  :-)

Or token passing?  Depending on the traffic CD or token would be
better.  One thing with token - you don't need electronics for
detecting a collision, or delays for trying again - you just wait
your turn...   Negative side is you've always got traffic.

> rEGARDS.  Sorry... cOuLdN't hElP mYsElF !! (Yeah, I've been told
> already !)
>

rEAlLY? WhO TOlD YoU??
MikeS
<.....mikesmith_ozKILLspamspam@spam@relaymail.net>

1997\09\05@093911 by tjaart

flavicon
face
KcW wrote:
>
> I remember an article by JaN AxElSoN in MicroComputer journal on doing
> exactly this with basic stamps, so it should be no problem. I'll dig up a
> scan for you if you would like. As I remember it was a pretty good article
> (as most of hers are).
> KcW

Is she related to mIGEUL or his fRIEND?

--
Friendly Regards

Tjaart van der Walt
tjaartspamKILLspamwasp.co.za
________________________________________________________
|        WASP International   http://wasp.co.za          |
|   R&D Engineer : GSM peripheral services development   |
|Vehicle tracking | Telemetry systems | GSM data transfer|
|Voice : +27-(0)11-622-8686  |  Fax : +27-(0)11-622-8973 |
|             WGS-84 : 26010.52'S 28006.19'E             |
|________________________________________________________|

1997\09\05@150852 by Dorin Dogaroiu
flavicon
face
>I am thinking of using RS-485 for hooking together some home automation
>bits which all can Tx & Rx. The Rx bit is easy but what if two or more
>devices try to Tx at the same time ? Collission detection is obviously
>required but am unsure of how to implement it on serial line. There will
>be no "master" in the system so a polling arangement is out. I did have
>the thought of when a collission is detected the unit could wait for the
>line to clear then try again. As each unit will have a unique address, I
>thought that I could use this as a variable for re-try timing to stop the
>units clashing more than once each time. Does this make any sense ?
>The serial data would be made up of 10-byte packets with header,crc & tail.
>I think there would be plenty of uses for such a multi-drop framework.
>Please tell me if I'm heading up that famous sh** creek !  :-)

Your idea of data transmission is the same with that used in CSMA/CD systems
(Carrier Sense Multyple Access/ Colosion Detection ) ( the Ethernet standard
is the best example ).

Speaking about RS485, I dont't know how you detect the colosion ( multyple
active transmitters )> You can try for example to receive the transmitted
data at the transmitting station and check it to see if it was transmitted
correctly .

Two years ago I built an RS485 communication system, but with a master
device ( a PC ) which polls slave devices ( Philips 80c552 based ) for
an interactive TV application.

                                       Dorin
---------------------------------
Dorin Dogaroiu
Research Institute for Computers
Bucarest, Romania
Email : .....dogaroiudKILLspamspam.....pcnet.pcnet.ro
       EraseMEddorinspam_OUTspamTakeThisOuTkappa.ro
---------------------------------


{Quote hidden}

1997\09\05@203844 by sdattalo

face
flavicon
face
Dorin Dogaroiu wrote:

> >I am thinking of using RS-485 for hooking together some home automation
> >bits which all can Tx & Rx. The Rx bit is easy but what if two or more
> >devices try to Tx at the same time ? Collission detection is obviously
> >required but am unsure of how to implement it on serial line. There will
> >be no "master" in the system so a polling arangement is out. I did have

<snip>

> Speaking about RS485, I dont't know how you detect the colosion ( multyple
> active transmitters )> You can try for example to receive the transmitted
> data at the transmitting station and check it to see if it was transmitted
> correctly .

If you're communication is half-duplex (which I guess is almost
always the case when there are more than two nodes present), then
you can use the Rx/Tx line for both communications and for
arbitration. I can't go into details, but the gist of the idea
is:

1) Talking node transmits its message.
2) At the end of the message the talking node switches control
 from the UART to a general purpose I/O.
3) After keeping the comm line at the same level as the stop
 bit for some predefined time, the talker can initiate an
 arbitration state by driving the line low. Then the talker
 can tri-state the comm driver and allow passive termination
 resistances to maintain the state of the comm line.
4) The listeners catch the transition marking the beginning
 of the arbitration.
5) Now the tricky part: Fight for the bus. There are a number
 of ways to do this. Probably the simplest is to pre-assign
 a time slot in which a device may drive the comm line. If
 a node has a message to transmit, then it will drive the
 comm bus during its time slot. Higher priority nodes can
 be given time slots closer to the start of the arbitration
 edge. The first node to drive the bus wins.

 If no node wishes to talk, then the last talking node can
 win the bus by default and send some sort of sustaining
 message to keep the bus alive.

 If you make the inactive period of the arbitration interval
 greater than one byte time, then it is very easy for
 unsynchronized nodes to  hop on the bus.

This whole scheme only works if your 485 driver is a
bidirectional one like the LTC485, DS3695 or the infinite
other equivalent pin outs. There is a control pin on this
device that can disable the transmitter.

Suffice it to say that I have proof that this scheme works
for RS485 (or is EIA485 now?) when the baud rate is 38.4k and
the distances are a half of a kilometer (I didn't have enough
wire to test longer distances - although a fiber optic link
into the network did increase the lenght to over a kilometer).

Scott
--
                                __o
 I buy pizza instead of gas.    \<
                             (*)/(*)

1997\09\06@192058 by Frans Gunawan

flavicon
face
At 10:50 PM 9/5/97 +1000, you wrote:
>I am thinking of using RS-485 for hooking together some home automation
>bits which all can Tx & Rx. The Rx bit is easy but what if two or more
......
I've done rs485 half duplex, bus topologi, command-response/polling protocol.
please look at my page, packets for master to slave are
;    SYN STX DEST    'P' ETX
;    SYN STX DEST    'S' FROM    CNT DATA..DATA ETX
and for slave to master:
;    SYN STX MASTER  ACK ETX
;    SYN STX MASTER  'D' TO      CNT DATA..DATA ETX

I know this is not perfect, no checking for data and maybe too many overhead.
But, it is enough, it works :) and I've tested it using hc11(master), PC
and 8031.
goodluck.
http://www.poboxes.com/f
f

1997\09\08@044519 by Gerard Gerritsen

flavicon
face
Hello,

< home automation & collision detection >

> If you're communication is half-duplex (which I guess is almost
> always the case when there are more than two nodes present), then
> you can use the Rx/Tx line for both communications and for
> arbitration. I can't go into details, but the gist of the idea is:
>
< lot's of idea's deleted >

Funny, I am working on a 485 bus system + protocol myself.

I figured out that I could use a half duplex bus ( 2 wires ) using
'switchable' transceivers ( Maxim has got some nice ones --> 1480 B )

The system works with one real master and 'psuedo' masters.

The master sends a broadcast or a direct request to one of the
slaves. If it is a broadcast the first slave will react and send
everything that might be important and will direct the second slave
to react. So basicly every point listens until it's adressed


Greetings, Gerard Gerritsen

ESD Electronics
Zwaansprengweg 20
7300 AE Apeldoorn, The Netherlands

email : @spam@gerritseKILLspamspamesd1.esd.nl
tel   : ++31-55-5499499
fax   : ++31-55-5427288

1997\09\08@120344 by STEENKAMP [M.ING E&E]

flavicon
picon face
Hi,

<snip>

> Speaking about RS485, I dont't know how you detect the colosion ( multyple
> active transmitters )> You can try for example to receive the transmitted
> data at the transmitting station and check it to see if it was transmitted
> correctly .

I recently designed a 485 bus topology network with 8031 nodes and an
embedded 188 and 386.  I also tried detecting collisions by receiving
what I transmit.  I found, though, that this only works if you use a
seperate receiver (not the receiver in the same package as your
transmitter, like LTC485).  Else you always receive what you transmit -
irrespective of a collision condition.  You need to look at the stuff
that is actually ON the two wires.
I used a simple checksum and acknowledge scheme.  It worked quite well.

Niki

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