Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

multi-drop networking protocol?

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Various
View previous topic :: View next topic  
Author Message
PatM

Bascom Member



Joined: 25 Oct 2004
Posts: 104

PostPosted: Sat Feb 16, 2008 3:07 pm    Post subject: multi-drop networking protocol? Reply with quote

I want to start playing with networked chips (RS-485 most likely) and while the hardware part is simple I'm having a hard time figuring out (or finding) a protocol to use.

For the most part this would be a master to many slaves network (easy enough) but I was thinking it would be good to have the network auto-configure when another slave is added. The obvious way would be to have a newly added slave send out a "I'm here" message so the master can add it to its routines. Of course, the immediate thought that came to mind is managing the bus. What another unit starts talking at the same time and the packets collide? Perhaps theres a way to have the master detect and interrogate the new unit?

I know many people must have had to handle this kind of thing and found solutions and I'm wondering if any has a link to something along those lines?
Back to top
View user's profile
bzijlstra

Bascom Ambassador



Joined: 30 Dec 2004
Posts: 1179
Location: Tilburg - Netherlands

netherlands.gif
PostPosted: Sat Feb 16, 2008 4:52 pm    Post subject: BenBus...?? Reply with quote

With Bascom-8051 I have done this...

http://members.home.nl/bzijlstra/software/communication/Benbus.htm

And with Bascom-AVR we have done this...

http://members.home.nl/bzijlstra/hardware/stepper/stepper.htm#boorautomaat

The communication between the three steppermotorboards and the masterboard is done with the BenBus-protocol (RS485).

Have fun
Ben Zijlstra
Back to top
View user's profile Visit poster's website
PatM

Bascom Member



Joined: 25 Oct 2004
Posts: 104

PostPosted: Sun Feb 17, 2008 4:48 pm    Post subject: Reply with quote

Yeah, I've done similar between a master and slave. What I'm looking for is something that deals with auto-configuration.

The easy way is to assign addresses on each board (physical or software) then tell the master to talk to the new unit. I'm thinking more along the lines of putting an un-addressed unit into a network, have it annouce its presense, then have the master assign the address. If a unit is removed, the master should notice and stop trying to talk to it.

Sounds easy but without something like an attention line (pull low to tell everyone not to talk because you're doing so) you could just inject bytes into another unit's message and screw up both of them.
Back to top
View user's profile
bzijlstra

Bascom Ambassador



Joined: 30 Dec 2004
Posts: 1179
Location: Tilburg - Netherlands

netherlands.gif
PostPosted: Mon Feb 18, 2008 10:01 am    Post subject: Sweep Reply with quote

Perhaps you can do a sweep every n minutes initiated by the Master.

Have fun
Ben Zijlstra
Back to top
View user's profile Visit poster's website
PatM

Bascom Member



Joined: 25 Oct 2004
Posts: 104

PostPosted: Mon Feb 18, 2008 12:49 pm    Post subject: Reply with quote

I was thinking that very thing Wink

Since this is RS-485 about the most units you could possibly have would be 128 (all 1/4 UL chips). In this particular application I can't see having more than 6 but it'd be nice to have a generic protocol.

I could broadcast a "Anyone new?" packet once a minute (probably overkill but not onerous. On powerup (after power failure) the master could step through all possible addresses with a "Are you there?" packet (optinal setting on master for "highest address"?).

Hmm, have to do a lot of thinking about this.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Various All times are GMT + 1 Hour
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
You cannot attach files in this forum
You cannot download files in this forum