On Wed, Jun 23, 2004 at 07:39:34AM +0100, Michael Rigby-Jones wrote: > >-----Original Message----- > >From: David VanHorn [mailto:dvanhorn@CEDAR.NET] > > >Connect them all in a ring. > >Packetize the data with source and destination addresses. > >For each widget, if it gets a packet that isn't for it, then > >send it along. > > > >Add a "time to live" byte, that is decremented by each widget, > >to prevent packets from looping forever. > > Trouble with this approach is that two serial ports per PIC would be > required, and only the newer(and larger) 18F support this in hardware. No it doesn't. The whole point of a ring is that data travels in a single direction. So the RxD of a single USART connects to the previous node in the ring while the TxD of that same USART connects to the succeeding node. It only takes one port. The problem with rings in general is the latency in data travelling around the ring and the potential for a single node failure to crash the ring. Another point is that every node in the ring until it gets to the target has to process every packet. On a shared bus with 9 bit addressing it's possible to configure the USART to ignore data and only interrupt on an address byte. This is really efficient because each node can set to listen for just the address byte, and when it comes, each checks to see if the packet is for them. All of the non addressed nodes simply go back to listening for the next address byte, while the target turns interrupts on for all data thus receiving the packet. This is one the primary reasons that I plan to implement a EIA485 bus when I get around to this project. However rings are simple and there are no potential for collisions because every connection is point to point. BAJ -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body