LIST P=PIC16F84
#INCLUDE "P16F84.INC"
__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _LP_OSC
errorlevel -302
cblock 0x0c
d1,d2,d3
endc
org 0
init
banksel TRISA ;bank 1
clrf TRISA
clrf TRISB
banksel PORTB ;bank 0
clrf PORTB
main bsf PORTB,0
call delay5sec
bcf PORTB,0
nop ;slight delay for possible RMW problem
bsf PORTB,1
call delay2sec
bcf PORTB,1
nop ;slight delay for possible RMW problem
bsf PORTB,2
call delay5sec
bcf PORTB,2
goto main
delay5sec ;5second delay
movlw 0x3F
movwf d1
movlw 0x20
movwf d2
Delay5sec_0
decfsz d1, f
goto $+2
decfsz d2, f
goto Delay5sec_0
return
delay2sec ;2second delay
movlw 0x7F
movwf d1
movlw 0x0D
movwf d2
Delay2sec_0
decfsz d1, f
goto $+2
decfsz d2, f
goto Delay2sec_0
return
end