I'm working with a Mega 2650. I'm trying to use the external interrupts on pins 20 and 21 (SDA and SCL), and I'm noticing that there's some unpredictable behavior that doesn't seem to be officially documented anywhere.
Specifically, I can't seem to configure those pins to input LOW. I do a digitalWrite(SDApin,LOW) after setting the pinMode to INPUT, but they still read HIGH even if they're not attached to anything.
What I do seem to have found (see this thread) is that SDA and SCL have internal pullup resistors that you have to compensate for with external pulldown resistors (or more pullup ones? I'm seeing conflicting statements from people running into this issue).
The point is, this behavior seems to be very different from how the interrupt pins on (for example) pins 18 and 19 work, where I can set them as LOW or HIGH inputs however I like and they behave accordingly. Can I a) get confirmation that these pins can't be pulled LOW with a digitalWrite like most others, and b) suggest that this be added to the Mega's documentation page in the playground?
I just want to save others the same headache, if they're doing something similar to me. If you need a pair of interrupt pins, either use 18 and 19 OR 20 and 21; don't mix and match them unless you're prepared to handle them differently in code and wiring! (Do I have this right?)