Joined: 21 Oct 2009
|Oct 21, 2009 4:21 pm
in my current project I'm facing the problem, that a master node has to find out, which slaves are currently present on the bus.
I need an algorithm/protocol how the master can scan the bus and assign short IDs to each one of the slaves (max. three slaves are present), which is used in the data packets send by the master.
Each slave has unique serial number (assign during production), but it is not known by the master. This serial number may be used for an initial configuration command to assign the (short) slave id. Slaves are limited in RAM, program space and execution speed, so the solution has to be simple.
What comes into my mind is something like a broadcast packet, where the slave are sending back there answers, but how do I prevent collisions on the bus?
Thanks in advance for your suggestions.