Hi, I need tons of advice. I am working on two unrelated robotics projects. The first involves using a PIC to handle multiplexing and pinging 16 sonar transducers. The hardware, except for the PIC is already assembled. The PIC only needs to output a four bit transducer select, an enable, a start, and listen for the return. This is pretty straightforward. The output is where it gets tricky. I want the PIC to act as one of several memory-mapped IO devices on a Motorola 68HC16 board's address bus. The bus has 8 bits of data, 8 bits of address, and one chip select line. I would like the PIC to output the correct 8 bit value onto the bus when one of the 16 addresses is requested by the 'HC16. The bus has a 100 ns wait state. I would like to use as few wait states as possible. My question is: What would be the best PIC for the job? What extra logic chips are necessary? What is the best way to handle the address decoding? Is is best done in hardware, or can it be done in software? How many wait states should I expect to use? The second project is a snake robot. A microcontroller will be embedded into each segment of the snake. The micro will handle all of the control for it's segment. A serial bus will be used to communicate to all of the micros. The micro will need to monitor 8 digitial IO lines, control two motors with quadrature encoders, and communicate over the bus. Also, it must be easily programmable--OTP's and JW's are out. The micro needs to handle quadrature decoding at rates of 2-10 kHz for two encoders. It needs to generate a simple velocity profile and operate a control loop to go to and to maintain position. It also needs to generate the PWM signal for the motor driver chips. Is there a small motor driver chip available? There will be some venelation holes for cooling, but it will only be natural convection. Here is another challenge. The entire real estate for the control electronics (micro, oscillator, glue logic, etc) is a cylinder 1 inch in diameter and 1/2 inch high. It looks like one 28 pin SOIC or one 44 pin TQFP will fit on a 1 inch diameter board. There won't be much room to run traces around the chips. I have the freedom to stack several boards on top of each other. Is this a good idea? What would be the best way to connect them? 1. What is the right micro for the job? Will a PIC be adequate? I am open to anything, Atmel, Scenix, etc. What will give the most/most flexible processing power in the least amount of space? 2. Which of the serial busses/protocols SPI, I2C, Microwire, RS485, etc. Will be easiest to implement with a PIC on both ends? (assuming I use a PIC) Which will offer the best throughput. There will be between 5 and 10 micros on the bus all at the same time. Ideally, the bus would also be used to reprogramm the micros without (much) additional wiring. Is this possible? 3. What is the best oscillator to use in this situation. 4. Commuinication leads will be running right next to the motors, the PWM motor drivers, and xx MHz micros. Do I have any chance of sending data reliably? Is there something simple I can do (like twisting the leads together) that will be effective at reducing noise? 5. Will a PIC even work if it is very close to (or right up against) a small 1" diamter brush type DC motor? Any comments are welcomed. Thanks, Paul A. Brown