org 0x00
BANK1
movlw 0x00
movwf PORTA
movlw b'10000000'
movwf TRISB
bsf PIE1,0
BANK0
clrf PORTB
movlw d'114'
movwf timer_count
settime movlw b'00110000'
movwf T1CON
; movlw 0xFF apparently I don't have to insert these 4 lines
; movwf TMR1L of code. Without it, the Timer automatically
; movlw 0xFF counts up to 0xFFFF. If I do insert this 4 lines,
; movwf TMR1H the Timer does not work as intended and the LED
;lights up upon power on. Any one know why?
bsf T1CON,0
wait btfss PIR1,0
goto wait
bcf T1CON,0
bcf PIR1,0
decfsz timer_count,f
goto settime
bsf PORTB,0
goto $+0
end