Enable INT7 on Mega2560

Hello folks,

I am working on a project with an Atmega2560. The chip is on a custom PCB, so I am NOT using the Arduino board. However, I have loaded the Arduino bootloader and I need to use INT7(PE7) as an interrupt.

Is there a way I can configure the pin to function as an interrupt on CHANGE? I have been searching the internet like crazy, and cannot find a solution.

I am attempting to set up a CC3000 WiFi module with INT7 as the IRQ pin, if that helps... When I manually connect the IRQ pin to INT3(pin 18), everything works fine, so I know my code is functioning properly.

Any info would be greatly appreciated!!

This page > learning tab > reference > external interrupts.

The Mega board lacks pin assignments for INT6/7. You'll have to add a description for your board.

I'm not sure about the procedures right now, AFAIR a new board has to be added to boards.txt, and a pins_arduino.h to the variants folder. You can copy the variants\mega\ folder, rename it to the name of your board, and edit in detail the digitalPinToInterrupt, digital_pin_to_port_PGM and digital_pin_to_bit_mask_PGM macros.

I found a solution for this, I used MegaCore AVR pinout and it works.