Download Arduino Mega 2560 Interrupt Pins Background. Direct use of interrupt numbers may seem simple, but it can cause compatibility trouble when your sketch runs on a different board. Different types of arduino board have different numbers of interrupts pins e.g.
You just call the function attachinterrupt and input the interrupt number. This function is sometimes referred to as aninterrupt service routine.mode:defines when the interrupt should be triggered. In atmega328 based arduino uno board or atmega168 based board, all the i/o pins can be used as the interrupt pins.
Arduino interrupt tutorial with example demonstration of how to use external interrupt and pin change interrupt in arduino.
External interrupts and pin change interrupts. Arduino uno have two interrupt ports and arduino mega2560 have six interrupt ports named as. It comes with more memory space and i/o pins as compared to other boards available in the market. Different types of arduino board have different numbers of interrupts pins e.g.