spurnymart
New Member
Hi
I am beginner in PIC programming. I need help with Timer1 in PIC 16F877.
My code is:
list p=16f877a
#include <p16f877A.inc>
org 000
goto start
org 004
nop
retfie
start
bsf STATUS,RP0
bsf PIE1,0
bcf STATUS,RP0
bsf INTCON,7
bsf T1CON,0
man
nop
nop
nop
goto man
end
My problem: I will not receive the interrupt when the Timer1 overflows and I don't know why. The PIR1 <0> bit is correctly set to log1 on overflow. But the interrupt routine don't start. I use the PIC simulator MPLAB IDE 6.6 and MPLAB SIM debugger.
I am beginner in PIC programming. I need help with Timer1 in PIC 16F877.
My code is:
list p=16f877a
#include <p16f877A.inc>
org 000
goto start
org 004
nop
retfie
start
bsf STATUS,RP0
bsf PIE1,0
bcf STATUS,RP0
bsf INTCON,7
bsf T1CON,0
man
nop
nop
nop
goto man
end
My problem: I will not receive the interrupt when the Timer1 overflows and I don't know why. The PIR1 <0> bit is correctly set to log1 on overflow. But the interrupt routine don't start. I use the PIC simulator MPLAB IDE 6.6 and MPLAB SIM debugger.