Re: Where can I find algorithm for RS485 network communicati
Actually, you need a token ring passing protocol where each micro must wait it's turn before it can speak. So, basically, you need the following:
0. Each micro must have a unique address
1. logic to claim token: Say, x ms times the node address wait time before a token is claimed
2. Once the token is claimed by any of the micro's, sent a frame. Find/create a successor. If there is no data to be sent, pass the token to the successor. If successor not found, send token back to the earlier node.
3. Define maximum node address so that after that address is solicited, send the token back to the first node.
If you do not want to do the token ring passing network, you need to create a master/slave configuration where one master arbritrates the data traffic.
Another way is to use a prioritized network such as CAN and use the CANopen protocol on top of it.
Have I confused you enough yet?!!
Ajay