; Delay routines, 16MHz OSC
;
; USED variables: t,t1,t2,t3
;-------------------------------{DELAY 100ms}----------------------------------
delay_100ms:
	 movwf	   t
del6:
	 movlw	   d'200'
	 movwf	   t1
del5:
	 movlw	   d'166'
	 movwf	   t2
del4:
	 movlw	   d'2'
	 movwf	   t3
d2:	 decfsz	   t3,f
	 goto	   d2
	 nop
	 decfsz	   t2,f
	 goto	   del4
	 nop
	 nop
	 nop
	 decfsz	   t1,f
	 goto	   del5
	 decfsz	   t,f
	 goto	   del6
	 return
;-------------------------------{DELAY 10ms}-----------------------------------
delay_10ms:
	 movwf	   t
del3:
	 movlw	   d'56'
	 movwf	   t1
del2:
	 movlw	   d'237'
	 movwf	   t2
d1:	 decfsz	   t2,f
	 goto	   d1
	 decfsz	   t1,f
	 goto	   del2
	 decfsz	   t,f
	 goto	   del3
	 return
;------------------------------{DELAY 100us}------------------------------------
delay_100us:
	 movwf	   t
del1:
	 movlw	   d'79'
	 movwf	   t1
d0:	 nop
	 nop
	 decfsz	   t1,f
	 goto	   d0
	 decfsz	   t,f
	 goto	   del1
	 return
;-------------------------------{DELAY 10us}------------------------------------
delay_10us:
	 movwf	   t
del:
	 movlw	   d'7'
	 movwf	   t1
d:	 nop
	 nop
	 decfsz	   t1,f
	 goto	   d
	 decfsz	   t,f
	 goto	   del
	 return
;--------------------------------{DELAY us}-------------------------------------
delay_us:
	 nop
	 nop
	 nop
	 nop
	 return
;*******************************************************************************