On Tue, May 12, 2009 at 7:55 AM, Gerhard Fiedler wrote: > solarwind wrote: > >> I need a protocol driver for PICs or at least some information on how >> to implement my own. I have a general idea on how to send data >> between PICs but the largest concern is collision. I don't know how >> to implement collision detection/avoidance. > > I don't remember who that was, but on one of the recent threads about > this issue that you started, someone posted a list of 4 methods which > seemed reasonably complete. Find that message before you continue... > This one from Harold Hallikainen? On Sun, May 10, 2009 at 4:34 AM, Harold Hallikainen wrote: > Using a 485 bus, there are a variety of options for device to device > communications without going through a master device. Here are some > possibilities. > > 1. Use Aloha protocol where each device just transmits when it has > something to send. If the overall traffic is low, most of the time there > will be no collision. If missed data is not critical (the next sample is > fine), only error checking on the receive side is required. No retransmit > is required. > > 2. A master grants permission to each device to transmit in turn. This > avoids collisions, but fails when the master dies. > > 3. Slotted network. Each node is granted a time slot when it is allowed to > transmit. Each node has a timer that keeps track of which slot we're on. > Received data (including that destined elsewhere) synchronizes the slot > counter. > > 4. Mini-Slotted network. A sequence of short time slots (shorter than > required for a message, but long enough for a node to start transmitting), > are allocated, one to each node. As in slotted, each node has a timer and > a mini-slot counter. When the mini-slot counter matches the node number, > this node is allowed to start transmitting and does start transmitting if > it has anything to say. On detecting data, all other nodes stop their > mini-slot timers and hold off advancing the mini-slot counter until > mini-slot time after the last byte is received. Then, they all start > advancing the mini-slot counters again. As with a slot system, each node > synchronizes its mini-slot counter based on received traffic. I've also > called this an "absence of data token passing system." A lack of data > transmission passes the permission to transmit on to the next node. This > is the system I used using Bell 202 modems on voice grade wire and radio > circuits in the DRC190 > (http://louise.hallikainen.org/BroadcastHistory/index.php/HallikainenAndFriends > ) > > Harold > -- Xiaofan http://mcuee.blogspot.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist