I've been reviewing the sonapic.asm file from Eric Smith's PIC project page. I've been unsuccesfull in attemping to EMAIL to eric@goonsquad.spies.com, so I thought I'd ask a question here. Specifically, the following code fragment appears in error: ; delay 1 millimeter = 6 microseconds = 12 cycles at 8.0 MHz rdloop: incf range,1 ; 0 increment range btfsc status,zf ; 1 incf range+1,1 ; 2 movf range+1,w ; 3 test for timeout - 10752 mm xorlw (maxrange/256)+1 ; 4 btfsc status,zf ; 5 goto rddone ; 6 btfss portb,echo ; 7 test for echo goto rdloop ; 8 rddone: My calculations agree that echo transit time is approximately 6 microseconds per millimeter (3 microseconds one way). But I count only 10 cycles per loop--so does MPSIM (under MPLAB). Is this a mistake, or am I missing something? Thanks, Dave Thomas