Hello,
I just made a program with a interrupt funktion in it. On my oppinion it should works but somewhere is a little error in it. I've already checked with the logic analyzer, that on the GDO0 pin is a pulse, but as I said, it does nothing in the program. Maybe anyone here can find the bug. Thanks a lot.
void Interrupt_init() {
GDO0DIR &= ~GDO0;
GDO0REN |= GDO0; // activate internal resistor
GDO0IE |= GDO0; // activate port interrupt at P2.0
GDO0IES |= GDO0;
__enable_interrupt();
}
// PORT2 interrupt service routine
#pragma vector=PORT2_VECTOR
__interrupt void Port_2(void) {
--- code ---
GDO0IFG &= ~GDO0;
}