MPU-6050 Interuupt with Arduino Micro

So when I hooked up my Arduino Nano to the MPU-6050, everything worked great. I have since changed to an Arduino micro and can now not get the interrupt pin working.

I have the MPU plugged into pins 2 and 3 for I2C communication, and then I plug in the interrupt pin to pin 12. Which is PD6 on the ATMega23U4.

When I run this code, it does not work. (Attached below)

When I have the INTERRUPT_PIN set to 12, it does not work. When I accidentally set the INTERRUPT_Pin to 2, I got some good data out of it, but that is one of the I2C pins. This MPU works fine on my Arduino Nano, so I think this is an issue with the INTERRUPT_PIN.

I thought that I could use any pin as a interrupt pin, so I am confused as to why this is not working.

MPU6050_DMP6.ino (15.7 KB)

Any digital pin can cause an interrupt, but you need to use pin change interrupts for most of them. Check to see if pin change interrupts are implemented in the library you are using. If not, check which pins can be used for external interrupt (PD6 cannot) and use one of those.

See Arduino - PinMapping32u4

I am using a custom Arduino Micro, so pin 12 has a copper trace leading to the interrupt, it cannot be changed. How would I go about setting the pin to be used as an interrupt pin?

The code is as follows

#define INTERRUPT_PIN 12  // use pin 2 on Arduino Uno & most boards

 Serial.println(F("Initializing I2C devices..."));

       // enable Arduino interrupt detection
        Serial.println(F("Enabling interrupt detection (Arduino external interrupt 0)..."));
        attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), dmpDataReady, RISING);
        mpuIntStatus = mpu.getIntStatus();