i have write the following programme for the TMR0 interrupt.
processor 16f84
include <p16f84.inc>
__config _RC_OSC & _WDT_OFF & _PWRTE_ON
org 00h
goto main
org 0x04
goto interrupt
main:
banksel OPTION_REG
movlw B'11000111'
movwf OPTION_REG
banksel INTCON
bsf INTCON , 7
bcf INTCON , 5
bcf INTCON , 2
routine:
banksel TRISA
movlw B'00000'
movwf TRISA
banksel PORTA
movlw B'01010'
movwf PORTA
clrf TMR0
bsf INTCON , 5
fin:
goto fin
interrupt:
comf PORTA , f
clrf TMR0
retfie
end
according to the interrupt routine the interrupt should only once comf Porta . as i have not clear the overflow and ser tmr0 interrupt again in intcon after the interrupt occurs. but it is continuously comf PORTa. what is wrong.