CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Multi-Master RS-485 System

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
robhol
Guest







Multi-Master RS-485 System
PostPosted: Wed Feb 15, 2006 8:38 am     Reply with quote

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

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Wed Feb 15, 2006 1:20 pm     Reply with quote

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
PostPosted: Thu Feb 16, 2006 9:27 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Feb 17, 2006 8:34 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group