Saturday, June 25, 2016

How to disable internal Arduino ATMEGA pullups on SDA and SCL with I2C bus

just edit libraries/wire/utility/twi.c and comment out the following:
// activate internal pullups for twi.
  digitalWrite(SDA, 1);
  digitalWrite(SCL, 1);


Doing this in the sketch seems to be equivalent:
pinMode(SDA, INPUT);
pinMode(SCL, INPUT);
Even doing this immediately after Wire.begin() potentially still sends 5V glitches on SDA/SCL.

(tested with arduino-1.6.0 on a NANO)

No comments:

Post a Comment