NetBurner 3.5.8
PDF Version
I2C

Topics

 Bit Bang I2C (GPIO)
 Software I2C master driven directly from a pair of GPIO pins.
 Legacy API MOD5441x, NANO54415, SB800EX
 Wire Interface
 Arduino-compatible TwoWire I2C controller/target interface.

Detailed Description

I2C API for NetBurner Platforms

There are two ways to drive an I2C bus, and both are available on every platform:

  • TwoWire drives the processor's hardware I2C peripheral. It is Arduino compatible and is the recommended interface for new designs. #include <Wire.h>
  • BBI2C is a software driver that bit-bangs any two GPIO pins. #include <bb_i2c.h>

The two can be used at the same time on different pins. Choose BBI2C when you need a bus on pins that have no hardware I2C function, when you need more buses than the processor provides, or when a device needs timing the peripheral cannot produce.

See the sub-modules below for per-platform pin tables and device specific details.