View previous topic :: View next topic |
Author |
Message |
robhol Guest
|
Multi-Master RS-485 System |
Posted: Wed Feb 15, 2006 8:38 am |
|
|
Has anyone built such a system (2-wire)? I have searched for a simple protocol to implement
in a PIC (876) "everywhere"but haven't found anything so far, in fact I haven't found any protocol at all...
For example I found this text and yes I agree with the text, but isn't there a standard already for this?
"Each node in a multi-master type RS-485 system can initiate its own
transmission creating the potential for data collisions. This type system
requires the designer to implement a more sophisticated method of error
detection, including methods such as line contention detection,
acknowledgement of transmissions and a system for resending corrupted data."
Any help is appreciated, a link to a good site or whatever!
/Rob |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Wed Feb 15, 2006 1:20 pm |
|
|
My first thought was MODBUS, but MODBUS is a single-master bus.
If you are building a system from scratch and you need multi-master capability, I would recommend CAN. It's noise immunity and cable requirements are pretty much the same as RS-485. However, you will implement your system quicker with CAN. |
|
|
robhol Guest
|
Multi-Master RS-485 |
Posted: Thu Feb 16, 2006 9:27 pm |
|
|
Thanks for your answer!
I have seen MODBUS - it is ok, but master/slave.
CAN is of course ok, but I have most of the hardware already.
So I still appreciate any help to find a protocol, if there exist one?!
/Rob |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Fri Feb 17, 2006 8:34 am |
|
|
You could build your own token-ring. Nodes just pass the token until someone needs to be master. Then they catch the token, do their master stuff, and re-launch the token. If a node does not see the token for a looong time it assumes the token was lost and launches a new one. If somehow two tokens exist they collide and are destroyed. Then a new token is generated. Make the token short enough to fit in a UART buffer so it can wait there if a node is very busy.
I an sure there are formal versions of this but I have never seen one. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
|