I am building a micromouse-type robot, and I am using sonar distance detection. I have constructed the sonar circuit out of the BASIC Stamp manual, and I have connected it to a PIC16C63/JW at 20MHz, and I am using one of the CCP modules in capture mode to time the echos. I am having trouble with spurious (some might say random) readings, and being both new to using PICs, and to audio-type electronics, I am having trouble ascertaining what is the cause. When previously connected to a Stamp, the circuit appeared to work, but since it was intended for use with the PIC, it was not fully tested on the stamp. If anyone on the list has experience of this or any similar situation, I would greatly appreciate it if they could give me any help. Circuit / PCB diagrams and source code are availiable if they will help to show what I am doing wrong. -- Ian Caulfield - Mailto:ic@obsnd.demon.co.uk Website (under construction) - http://www.obsnd.demon.co.uk/ian "Travelling thru' cyberspace ain't like dustin' crops, boy"