Skip to content

Software I2C voltages and currents

Koepel edited this page Jul 8, 2021 · 4 revisions

Software I2C voltages and currents

The hardware I2C controller inside the ATmega microcontrollers (as used in the Arduino Uno) has specific hardware for the I2C bus. It has, for example, a reduced slew rate for output signals and a filter for the input signals.
That will reduce voltage spikes and current spikes on the I2C bus.

With a software I2C library, the pull-down current could be up to 40mA for an Arduino Uno. That might create a current peak, resulting into extra electrical noise in the wires of the I2C bus.
For fast processors without such filters, sometimes a resistor of 100Ω is used in the signal path of SDA and SCL to slow down the slew rate. It might be appropriate to use those resistors with a software I2C bus as well.

The software I2C libraries are more compatible with a I2C bus with lower voltages.
For example the Arduino Uno requires 3.5V for a valid high level with the hardware I2C controller. A normal digital input requires only 3.0V for a valid high level. The Arduino Leonardo and Micro require even less voltage.
That means when a pcb is finished and it turns out that a I2C level shifter was needed after all, then replacing the Arduino hardware Wire library with a software I2C library might make it work.

The newer processors do not have extra hardware to filter the I2C signals. They don't have a difference in current and voltages with a software I2C bus.

Conclusion

The result of using a software I2C library instead of the hardware I2C controller can not be predicted, it depends on many things and differs from situation to situation.