It says that there are 10k internal pull-ups the 5V on the Mega which are enable by default in wire.begin() and proposed some solutions with external hardware (which I think is quite complex).
What I don't understand:
Why not simply disabling the internal pull-ups by editing those lines (e.g. comment out) in the twi.c file and only use the external pull-ups???
// activate internal pullups for twi.
digitalWrite(SDA, 1);
digitalWrite(SCL, 1);
Or is there something I don't see? Is that - for some reason - a bad idea?
This is a controversial subject with many opinions, but no one has yet reported a chip being damaged this way (but you do need those two 4k7 resistors).
came from. There might be past discussion on this topic.
jeah, but as I understood this sentence refers to the approach of:
"...placing a resistor between 3.3V and Gnd to provide additional load for the 3.3V regulator..."
So for me it's more about:
Why not disabling the internal pull-ups and only use external 4k7 resistors as a simply approch for 3v3 sensors? Is there a reason why the wire lib enables them by default?
The Mega has external pullup resistors, see RN1B and RN1C on the schematic. They are part of a 4-resistor package.
RN1A and RN1D are not used so the part could be removed from the board.
"Is there a reason why the wire lib enables them by default?" Code writers prerogative/whim/seemed like a good idea at the time?
I'm not planning to remove the hardware (the resistors) completely from the board. (I prefer to use them in operation with 5V sensors another day )
Using another lib would be an idea.
Nevertheless, as I understood from that: It seems not to be a bad idea to disable the pullup in the wire lib and only use "my own" pull up resitors (outside the mega board) for safe operation of 3v3 sensors via I2C?!