??? 11/04/08 00:08 Modified: 11/04/08 00:25 Read: times |
#159603 - Not so much specific for RS-485 Responding to: ???'s previous message |
In most RS-485 networks, you will be able to hear collisions. Not on a bit-by-bit level since there is no dominant bit state, but quite often in broken packets.
The big problem is what to do if you do hear a collision. In a single-master system, something is very broken if you hear a collision. A slave has locked up, or there are multiple slaves with the same address or a slave accepted a message with incorrect checksum. In a multi-master system, the used protocol - and the cable length - very much affects how fast/well arbitration can be handled. Most protocols do not support collision detection in other ways than that both masters will fail and then have to select random times for a retry. If multiple masters are needed, then it is best to design a protocol where one master hands over the bus to the next master but you need to be able to establish an initial master, assuming that the individual nodes do not boot at the same time. Being able to hear your own transmission allows way faster logic for such arbitration. But such arbitration has to take into account that the signals are not infinitely fast, and the length of the bus does matter. And the cable length also represents a resistance. This resistance can in some situations make two masters at each end of the cable fail to garble the transmission on the other side of the cable. So listening in on own transmissions is not fool-proof but can in many situations help as one step in a bigger arbitration scheme. Being able to listen on own transmissions also helps when detecting problems with the cable or tranceiver chip. |