electronicsman
Full Member level 5
I am bit confused with ISRs of microchip. These are the two versions i can write which is correct and why? Please help.
I mean to say interrupt flag should be cleared at the beginning or end?
Code:
version 1
void __attribute__((__interrupt__,__no_auto_psv__)) _T1Interrupt(void)
{
C instructions;
IFS0bits.T1IF = 0;
}
version2
void __attribute__((__interrupt__,__no_auto_psv__)) _T1Interrupt(void)
{
IFS0bits.T1IF = 0;
C instructions;
}