Hi! I want to Know how to connect and program multiple AT89c51 on a common serial bus so that no one can produce conflict with another client AT89C51, how can i ensure the bus conflict in case of multi master system.What would be the maximum number of clients i can handle on this common bus system.can i find some theory/stuff/material regarding this issure. Regards! Ahmad Kamal.
Ahmad, Multi-master serial systems can be a tricky situation. One possible way (although I'm not sure if this retains the multi-master moniker) would be to implement a token-passing scheme. Use some structured method to pass the token from one node to another, and then when that node owns the token, it is free to act as master. When it's finished, it passes the token to the next. Looking up "token passing" will give you some idea what I mean. This is what the old "token ring" ethernet networks did to try to prevent conflicts. Also, depending on how you define conflict, you might implement a physical layer that provides collision detection. This is what 10Base-X implements for Ethernet. If two things try to send a packet at the same time, they each pick a random wait time and try again. This has its own set of worries associated with it as well though.
how can i ensure the bus conflict in case of multi master system.What would be the maximum number of clients i can handle on this common bus system.can i find some theory/stuff/material regarding this issure. Master-slave is (typically?) collision avoidance, whereas multi-master (typically?) is collision detect. I can not see any way you can have multiple masters with collision acoidance, to avoid cillision, you would need a "masters master" For examples of collision resolution, have a look at the IIC bus or the J1708 standard. I, personally, have avoided multi-master as the plague, except when forced (such as communicating with j1708 devices) you do what you want, I would have a REALLY good look and see if I could do the needed with a master-slave rig. Erik The best (and most) IIC appnotes i: http://www.semiconductors.philips.com/buses/i2c/support/index.html A little true story about collision detection: In the J1708 standard, the rule is that when a collision is detected, the transmitting devices insert a random delay before attempting the transmit again. Two devices, both using the Keil rand() function collided and, had I not stopped them, they would still be fighting today. The Keil rand() insert the same sequence every time it is used.
A bit more info: What would be the maximum number of clients i can handle on this common bus system Using "1/8 unit load" RS485 transcievers, you can have 256 units on the bus. With standard transcievers (75176) you can have 32. An addition to my "Master-slave is (typically?)..." post above: conflict detection buses are (most often?) single ended (noise sensitive). Conflict avoidance buses can be differential (noise resistant). Erik
View all questions in Keil forum