Main Site Documentation

Can I connect an external interrupt to a pin on a Port that doesn't support interrupts e.g Port 1 of LPC178x/7x of the G120 Module?


In my project I am using fans to control the temperature of the system and the chip I am using has a FAN_FAILURE mode that goes from low to high when the fans fail. I was wondering if I can connect this to a pin on Port 1 on the G120 for example pin 1.25-LCDG5. I have read the manual for the arm 3 processor and it says for GPIO interrupt ports are only 0 and 2. On page 137 it says “Port 0 and Port 2 can provide a single interrupt for any combination of port pins.”. So my question is if I do connect the external interrupt onto pin 1.25 will an interrupt be registered if the FAN is to fail.

G120 schematic - \

LPC178x/7x processor page 137


You can of course connect the signal to any GPIO you want.
But you need to poll the pin in a loop if it does not support interrupts.


Ok Thanks. The User Manual wording threw me off in which the first bullet point mentions only port 0 and port 2 and then the second bullet point mentions port pins but did not specify which ports.

[quote]• Port 0 and Port 2 can provide a single interrupt for any combination of port pins.
• Each port pin can be programmed to generate an interrupt on a rising edge, a falling
edge, or both[/quote]


That means you can use all pins of port 0 and 2 independent.
You can use only 1 pin from port 0/2 as interrupt or two or all of them.
You will get the interrupt of them independently, and you will exactly know which pin you got it on.
There are CPU’s, where you just get an interrupt signal for a whole port, and you need to check yourself, which pin has changed.