Ken, Sorry, I accidently sent the previous message before it was finished. I am a beginner and don't understand a portion of a timing loop in the sample code you sent me (which I greatly appreciate). I have been taught that all commands execute in one instruction except for goto, call, return, which execute in 2, or a incfsz (or other command) which results in 0. I understood all of your timing loops except for one, which stated it was a 5us long timing loop. Time_ip btfss Port_B,pulse_ip ;(1 instruction) goto end_ip ; only executed if 0 incfsz ip_pulse,1 ;(1 instruction) goto Time_ip ;(2 instruction) goto max_pulse ; only executed if 0 It seems that the ip_pulse is incremented every 4us. What am I missing? Jon