
Originally Posted by
Nigel Goodwin I've not bothered looking at the datasheet to test your code, but you're not writing any value to Timer1?.
I think it does not matter. There is some value and when the timer is running, it will overflow soon or later. I try your advice but there is the same problem.
Code:
list p=16f877a
#include <p16f877A.inc>
org 000
goto start
org 004
nop ;interrupt routine - doesn't work
retfie
start
bsf STATUS,RP0
bsf PIE1,0 ;allow timer1 interrupt
bcf STATUS,RP0
bsf INTCON,7 ;allow global interrupt
movlw 000h
movwf TMR1L ;set the value
movwf TMR1H
bsf T1CON,0 ;run timer
man
nop
nop
nop
goto man
end
[/code]