According to my test's on MPLAB 6.42 this will give you exactly 1000uS delay using 4MHz clock.
Code:
DEL MOVLW .2 ;Delay start here, count back onece from 75 and onece from 255.
MOVWF DELF2 ;990 cycle plus the 4 mov cycle=4 and the 2 goto=6 Equall 1000 cycle.
MOVLW .75 ;=1ms
MOVWF DELF1
DEL0 DECFSZ DELF1 ;Start decrementing the file registers.
GOTO DEL0
DECFSZ DELF2
GOTO DEL0
RETURN ;Go back if is done
I'm sure there is other way to do it, I just can't find it right now.
ps:I'm learning assembler myself to
Comments are welcome.
Your first location for anything PIC should be the PICList at http://www.piclist.com, for your particular request they have a delay code generator - it's really great!.[/quote]