; Descripcion: Delay 50000 ciclos
;-------------------------------------------------------------
DEMORA movlw .55 ; 1 set numero de repeticion (B)
movwf PDel0 ; 1 |
PLoop1 movlw .181 ; 1 set numero de repeticion (A)
movwf PDel1 ; 1 |
PLoop2 clrwdt ; 1 clear watchdog
clrwdt ; 1 ciclo delay
decfsz PDel1, 1 ; 1 + (1) es el tiempo 0 ? (A)
goto PLoop2 ; 2 no, loop
decfsz PDel0, 1; 1 + (1) es el tiempo 0 ? (B)
goto PLoop1 ; 2 no, loop
return ; 2+2 Fin.
;-------------------------------------------------------------
Requerimientos
-----------------
- Declaracion de PDel0 (registro)
- Declaracion oe PDel1 (registro)
- 1 nivel Stack
Ejemplo de uso
--------------
call DEMORA ; Delay 50000 ciclos (incluyen call+return)