Here so that you don't have to download the file
;30 - Days Delay
;This program turns on an LED for 30 days and turn off after that
;Author: Jack Emund Wong
;email:
neoaspilet11@yahoo.com
;
Delay
Loop1 decfsz Count1 ;1 MC
goto Loop1 ;2 MC, 255 X 1 + 254 X 2 = 763 MC
Loop2 decfsz Count2 ;1 MC
goto Loop1 ;2 MC, 255 X 1 + 254 X 2 X (Loop1) = 387,859 MC
Loop3 decfsz Count3 ;1 MC
goto Loop1 ;2 MC, 255 X 1 + 254 X 2 X (Loop2) = 197,032,627 MC
Loop2 decfsz Count4 ;1 MC
goto Loop1 ;2 MC, 255 X 1 + 254 X 2 X (Loop3) = 100,092,574,771 MC
retlw 0 ;Note if your clock is running at 4.63 MHz this
;subroutine is excuted for approximately 84473 seconds or 1 day with
;an offset of 473 seconds. You can refine the clock to minimize this offset
;by computing the proper clock speed.
Main
MainLoop call Delay
incf DayCount,1
movlw 1E ;w = 30DEC
xorwf DayCount ;w = w xor DayCount
btfss STATUS,Z ;check Z flag
goto MainLoop ;Z =0
;Z =1 Code here to turn off you LED