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?

asked Apr 5, 2018 at 15:14

1 Answer 1

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.

answered Apr 5, 2018 at 16:24
2
  • 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. Commented Apr 5, 2018 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. Commented Apr 9, 2018 at 14:52

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.