Q.1.Why we have to clear the Interrupt flag in ISR as given below i.e. #pragma vector = PORT2_VECTOR __interrupt void port2(void) { P2IES ^= BIT1; // Toggle interrupt edge SWITCH DEBOUNCING P2IFG &= ~BIT1; // Clear P2.1 IFG }
↧