Thanks Nigel
Mark,
Thanks for your input. The other devices are 2 Ultrasonic Range Finders, each on their own Printed Circuit Board (PCB). I won't need to send data streams between the 3 PICs so don't need the USART. Just need a logic (yes/no) connection.
I.E. The PCB with PIC1 and the PCB with PIC2 send/receive Ultrasonic. The timing from send to receive adjusts Pulse Width Modulation (PWM) to their respective motor. The PCB with PIC3 senses Infrared (IR) and needs to know whether PIC1 or PIC2 was adjusting the PWM at the time it detected the IR signal.
This is my first atempt to design an autonomous robot using PIC µControllers. The PCB with PIC1 will be mounted on the left, controlling the motor on the right and the PCB with PIC2 will be mounted on the right controlling the motor on the left. The Ultrasonic Range Finder (URF) adjusts the PWM, slowing down the motor according to the distance (ultrasonic send/receive timing) to the object detected. The closer the object, the slower the motor runs, thus steering away from the object. The URF has a range of about 24 inches. In the event it is unsuccessful at steering around an object the Infrared PCB with PIC3, which has a range of about 6 inches, will stop the robot before it runs into the object. PIC3 needs to know which way the robot was being steered so that when it processes the STOP and TURN it will know which way to turn. In the event both PIC1 and PIC2 are slowing down their respective motor when the IR detects an object straight ahead then it will need to process a STOP, turn 180° and reset PICs 1/2 so it operates as though it had just been turned on.
For instance, if it were going down a hallway. When it gets close to the end, both URFs would
"see" the end of the hallway slowing the robot untill the IR detects that the wall is within 6 inches. Because both URFs were adjusting the PWM the robot (PIC3) would know to turn 180°.
|