Hi, Here is a quick idea I came up with: Have three wires going to each PIC. One for ground, one for serial data, and one for interrupt. When the hub has something to say, interrupt will change state, and all PIC s will listen to see if their ID is called. If it is not their ID, they will return from the interrupt and carry on, but if it is their ID they will continue to read the serial data. I only hope you can do interrupts in PicBasic. By the way, the code you sent me for DTMF was incomplete, it was calling external routines. Can you try compiling it again, but send me the HEX file that goes to the PIC (try a 16F84) rather than the assembly? But thanks for that anyway. --Nick --- Peter May wrote: > Hi all. First off let me say I only tag along on > this group as a second > source of info. I use PicBasic to program and cannot > understand assembler at > all but still the engineering bits and pieces handy > and informative. In no > way am I knocking assembler but am more knocking > myself for not taking the > time to learn it. > > Anyway the question. > > > I want to create a network of micro's. So far rs485 > seems the go. What my > problem is how to get them all to talk and not have > I suppose PACKET > colisions. > > I have a PC that is connected to the world that I > use as a Windows server > program. It is connected to the serial port and can > send and recieve info > from that port. > > I have several pics on the network. > > I was going to make a hub or a main pic. One part of > the hub connects to the > pc and another to the rs485. > > What is a good way of getting these devices to > communicate? I was going to > have each device listen for an incoming ID string > but this meant (well in > pic basic anyway) that part of the time it was > simply sitting there > waitning. If nothing came in it would go off and do > the rest of the program > and then come back and listen again. How would the > hub know it was sitting > there listening and simply the sending of the string > and the waiting for the > incoming could be out of sequence thus missing each > other. > > I use a cat 5 cable for the network so I have 8 > wires I can use. > > Another idea was I use an additional wire other than > what the data goes back > and foward on to send an id on. In picbasic you can > use a command to send a > PULSE OUT of a certain length. I can then assign a > ID to each unit and along > this cable send a lenght that matches the id. I have > set up 2 pics and sent > a series of lengths to the second from 1000 to 5000 > in steps of 20 and it > picks it up each time. So if we hang each device via > a resistor and we have > the hub send a pulse out for say 500 millisecs and > in each unit we have a > detection command in each cycle. > > I think you get the idea. How do you guys do it? I > am after a reliable way > to poll each unit. Additioanly if I could......be > able to raise an alarm on > the hub if any of the units want to. > > I have the software written to do the internet comms > part and can get that > ifo from remote sites to the hub.... > > Ideas???????.......Suggestions???????........ > > Regards, Peter. > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu