Using FX1/FX2LP extr_intr example code to implement extrenal interrupts INT0# and INT1#

Question: How to use FX1/FX2LP extr_intr example code to implement extrenal interrupts INT0# and INT1#?

 

Answer:

When using either FX1 or FX2LP extr_intr example codes to implement external interrupts INT0# and INT1# there are two lines of code in the isr.c file of the project that need to be changed. 

1) Line 11: change from IOC ^= 0x01;  to  IOA ^= 0x01; 

2) Line 18: change from IOC ^= 0x02;  to  IOA ^= 0x02;

These corrections toggle the appropriate pin of port A to clear the interrupt in hardware.