Koepel edited this page Apr 4, 2016 · 6 revisions

Februari 2016, status of SoftwareWire.

In februari 2016, the version of SoftwareWire is 1.4. Because of the extra features the speed is lower, that has to be corrected. At the moment it is more important that the I2C will work.

The SoftwareWire is for the AVR microcontrollers, for example the Arduino Uno, Leonardo, Micro, Nano, Mega 2560, Pro Mini, and so on. The SoftwareWire is not for the Arduino with ARM processors, like the Arduino Due and the Arduino Zero. They could be added, by using normal digitalWrite() calls.

The current wave shapes for SoftwareWire compared to the Arduino Wire library: wave shapes of SoftwareWire versus Wire The wave shapes are for Wire.beginTransmission(1) and Wire.endTransmission() without a I2C slave connected.

It shows a number of things:

  • The duty cycle of the clock is less than 50%.
  • The SDA is pulled low just before the SCL is made low in the Wire library (very fast chips could detect that as a start condition). In the SoftwareWire the SDA is pulled low after SCL is made low.
  • There is no distance between releasing the SDA and the rising edge of the last SCL pulse (the nineth pulse for the acknowledge). That should be added.

A new function has been added to the Wire library for some processors : setClockStretchLimit(). I think that function can be added to the SoftwareWire as well. Another function is Wire.pins(,). That could be added as well. The ESP8266 Wire compatible library uses: "Wire.begin(sda, scl)". That could be added as well. However the ESP8266 Wire compatible library is going in its own direction.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.