Hi I have been meaning to do this on robots for years on other microprocessors but now I know about the potential of the PIC I think it will be easier to put into practice. My method is every pic being chained with the most important task at the end and the controller at the start (input side). When a more inportant task is found an interupt is caused on a PIC nearer the start of the chain. Then a serial identifier is sent to this PIC. This pic then causes an interupt on the next one and the message is passed along the chain. After the interupts, normal monitoring resumes. The main controller pic has a serial output which contains an identifier of what to send to and the data. On receiving an interupt the controller adds the serial data to the program counter in a lookup table of jumps. It then goes to a subroutine which carries out a small amount of code sending an output to say the drive motors. Lets take a christmas example, a PIC controlled pine needle vacuum cleaner. Here is how the chain would go | representing interupt, . representing serial data Bump Sensor | . | . Battery Monitor | . | . Needles Detector | . | . Controller . . . . . . . . Motors Vacuum (ID 01) (ID 10) The most important thing is not to bump into tree or presents and interupts ans data are passed along the chain until they reach the controller. Lets say the bump was on the left sensor and the data showed that. The PIC would jump to the left bump routine where it would send serial data of the form 01xxxxxx where 01 tells the system the motors are needed and x signifies data. The routine of what to do if there is a left bump could be in the pic and the motor controller would just respond by putting the data on some output lines or it could be a mini controller in itself with a routine to carry out reverse, turn right, go forward or whatever was needed for a left bump. Needles detected would be least important and the vac would be turned on. To avoid missing needles during a bump, the vac would only be turned off when the needles detector told the controller that there were no needles anymore. Hope this helps. Please tell me how you get on as I have not tried any systems yet. Happy Christmas Tim ________________________________________________________________________________ At 13:51 22/12/96 -0600, you wrote: >Seasons Greetings, > > I'm looking for a method to network several micros for real-time response > in a robot. One micro may be looking for obstacles in the robot's path, one > may be counting pulses from the wheel encoders, one may be getting distances > for wall-following, one may be working a manipulator, etc. The point is that > it is necessary for them to talk to one another, but not to all the others, and > that some messages are more important than others (HEY - there's an immovable > object dead ahead!). > >1. How are the micros hooked together, ie. what is the network topology? > Use a common bus? sequence through each? Wire the micros that talk to each > other together? > >2. How are messages assigned priorities? Do/can they interrupt one another? > Should a message priority be part of the message? Is a Brook's style > subsumption scheme plausible? > >3. How does a micro ready to send a message get the attention of the receiving > micro? Are interrupts necessary? How is message contention resolved? > Are interrupts a good idea, particularly when there's lots of messaging > going on? > > I concerned about how many I/O lines are required for each micro-to-micro > connection and the time it takes to pass a message around many micros, if that > topology is used. A message is a simple 24 bit serial transmission. > > Thanks and Merry Christmas, > >John- >