KPL wrote: >> incoming signal - buffer -=- resistor - buffer -=- outgoing signal >> >> the PIC connects to the = places. it can receive the signal, or block it >> or not, or even send something of its own choice to the next PIC (I did >> not use that). after power up there was an 'address resolution phase' >> where every PIC got its address, first one first, after it received its >> address it unblocked comm to the next and kept its assigned address. >> >> > > Not completely clear to me - what happens if one of the controllers in > the middle of the chain dies/hangs/etc? > Actually I'm thinking about the same application - greenhouse > controller network, just not for commercial application. > > I found that Microchip's 9-bit addressing scheme is a great way to handle addressing without too much overhead. You send the first byte in 9-bit mode as the DESTINATION ADDRESS of the intended recipient. All the units on the bus pick up the address byte. If the address matches, the rest of the traffic is then extracted at 8-bit mode, which is unreadable in 9-bit mode. Only the intended recipient grabs the bus for a reply. That drops 90+% of the work needed for serial communication. I used it for casino CAT3 duplex networks (a single pair at RS422). At that time, only 64 stations could be bussed, but newer devices will handle up to 256. Usually, one address (either h'00' or h'FF') is reserved as a "broadcast" address, which is listened to by ALL stations (but never responded to); but I used 00 as broadcast and FF as a special address that meant "for any unit not assigned an address yet"; to simplify adding and addressing a new unit just placed on the bus (you must think carefully about how procedures will be done). We also had a tiny beeper on each unit that allowed us to easily identify each address when installing the network. On standard CAT3 (telephone pairs) we could communicate anywhere within a casino at 19.2kb with 1% or less repeated packets. The purpose was player card tracking, a very early version. --Bob --Bob A -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist