Looking into the schematics for the Arduino Mega I noticed that pins PE6 and PE7 are interrupt-enabled (INT6 and INT7 respectively); however, they remain unconnected to any Arduino I/O pin.

I'm designing a custom board based on the Atmega2560 and want to use the Arduino IDE/Compiler to upload my code to it, so I'm pretty much replicating a big part of the Arduino Mega schematic into my board.

However, I would really like to enable these two extra interrupt pins (having 8 interrupt pins in total) in my board, but I'm now sure how to proceed from the software side. How could I enable this new pins in order to use them from the Arduino compiler?

Atmega2560 Interrupt pins


  • 1
    In the original Arduino Mega board variant the unconnected pins aren't defined in it. Just use MegaCore which defines all pins.
    – KIIV
    Commented Jul 26, 2018 at 5:22
  • Awesome. I didn't know this existed. I'll check it out, so far looks promising. Thank you.
    – Nicolás
    Commented Jul 26, 2018 at 6:01

1 Answer 1


If you are not afraid of getting your hands dirty by touching hardware registers, you can access those pins bare-metal style, using port manipulation. You will have to read the datasheet, specifically the section “External Interrupts” if that's what you are after.

This works with the stock Arduino core (or even without core), which may be interesting from a maintenance point of view, but it's not as easy to use as the Arduino interrupt API.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.