> I see... well, for the one project I have that uses a Polaroid unit, I > have a TIMER0 interrupt (#int_rtcc) set up for 900uS interrupts to > increment a global char range variable. I clear the range variable and > TIMER0, fire the sonar, and wait for either a timeout or an echo signal. > If I get an echo signal, the range var holds the range in feet, times two > (round trip for the ping). After that, wait until 80ms has elapsed before > firing the sonar again. With the sonar unit I have (not from a camera, > but same type more or less) I can get accurate ranging out to about 36' or > so. Just be aware you may see a lot of echoes depending on where you are. > Would it be possible to get a snippet of the code to see how to set this all up. This whole PIC, C code, robotic thing is very new to me. Now I don't want to cheat you out of anything because I know you have put a lot of time into the code you wrote. But, enough to get me going would be appreciated. The one camera board, how did you connect it to the PIC, and which PIC did you use? BTW, I have the CCS PCW compiler. Duane -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu