This commit is contained in:
Ziver Koc 2008-11-14 16:38:36 +00:00
commit 7748d4a1f5
2 changed files with 203 additions and 0 deletions

21
util.inc Normal file
View file

@ -0,0 +1,21 @@
; Calls the delay_1ms routine the number of times specified by
; the W register.
delay macro time
movlw time
movwf R_DEL2
__delay_loop
call delay_1ms
decfsz R_DEL2, F
goto __delay_loop
endm
; When called gives a delay of about 1000 cycles, or 1ms at 4Mhz
; before the next instruction is executed.
delay_1ms macro
movlw d'248'
movwf R_DEL1
__delay_1ms_loop
nop
decfsz R_DEL1, F
goto __delay_1ms_loop
endm