0

Looking at the pinout for the Arduino MEGA:

enter image description here

I see that Pins 20 and 21 can be both SDA and SCL or Interrupts 0 and 1.

If I'm using an Adafruit I2C 16x2 RGB LCD Shield connected to the SDA and SCL pins by the USB Jack, is there anything I can do in my code to still use INT0 and INT1 off Pins 20 and 21 for a different purpose?

2

No, there is nothing you can do.

Both the SCL pins and both the SDA pins are physically connected together by copper tracks. They are in effect the same pin. If you use I2C you can't use INT0 or INT1. You have INT2 and INT3 though (pins 18 and 19), as well as Pin Change Interrupts on a large number of other pins.

  • I think there 2 other INTs that are brought out to pins as well, and then 2 more that are not, if PCINT won't meet your needs. – CrossRoads Apr 5 '18 at 17:12
  • There are other INT pins for the MEGA I'm now using one of them. I haven't heard of PCINT though, I'll look into it. – ATE-ENGE Apr 9 '18 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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