Arduino Mega, SDA/SCL pins, and interrupts


hi,

i'm working mega 2650. i'm trying use external interrupts on pins 20 , 21 (sda , scl), , i'm noticing there's unpredictable behavior doesn't seem officially documented anywhere.

specifically, can't seem configure pins input low. digitalwrite(sdapin,low) after setting pinmode input, still read high if they're not attached anything.

what seem have found (see this thread) sda , scl have internal pullup resistors have compensate external pulldown resistors (or more pullup ones? i'm seeing conflicting statements people running issue).

the point is, behavior seems different how interrupt pins on (for example) pins 18 , 19 work, can set them low or high inputs , behave accordingly. can a) confirmation these pins can't pulled low digitalwrite others, , b) suggest added mega's documentation page in playground?

i want save others same headache, if they're doing similar me. if need pair of interrupt pins, either use 18 , 19 or 20 , 21; don't mix , match them unless you're prepared handle them differently in code , wiring! (do have right?)


hi,


specifically, can't seem configure pins input low. digitalwrite(sdapin,low) after setting pinmode input, still read high if they're not attached anything.



in situation pins floating - can't expect definite behaviour floating pin.


Arduino Forum > Using Arduino > Programming Questions > Arduino Mega, SDA/SCL pins, and interrupts


arduino

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial