Electronic – Is the CAN bus protocol a master and slave protocol

cancommunication

I am investigating if the CAN bus will work for the projects I am building at the moment.

I want to create a bunch of input/output controllers that will accept/buffer commands, execute them and then report back progress. My feeling is that a master and slave setup will not work best for project, but I am not sure if the CAN bus works on that principle.

Best Answer

A CAN bus is multi-master and automatically arbitration free. The whole point is that you don't need a single master or main controller to take care of everything. Each message that is sent has a priority, and higher priority messages trump lower priority ones (a lower priority message will wait until there isn't a high priority message being sent). So there are no slaves. It's kind of similar to a peer to peer network, in that it's decentralized. The reason this is done is to reduce failure points. If a single main controller failed, so would the entire network. If there is no central controller, a single component can fail and the rest of the system will keep going.

For your network, you should assign priorities to each command sent depending on what's most important. The Wikipedia article is actually quite good.