Skip to main content

I2C bus

Use of the I2C bus​

The I2C bus for the latest revision of the micro:bit separates the I2C signals into Internal and External use. The previous revisions share the I2C bus with the edge connector and the target MCU.

The internal signals run to the target Nordic chip and communicate with the motion sensor and interface chip.

The external lines run to the edge connector and can be used for accessories.

I2C block diagram​

I2C block

Table of addresses used​

accelerometermagnetometer (compass)Interface MngInterface Storage
motion sensor variant 1 (LSM303AGR)0x19 (0x32/0x33)0x1E (0x3C/0x3D)0x70 (0xE0/0xE1)0x72 (0xE4/0xE5)
motion sensor variant 2 (FXOS8700CQ)0x1F (0x3E/0x3F)0x1F (0x3E/0x3F)0x70 (0xE0/0xE1)0x72 (0xE4/0xE5)

The V2 has a dedicated bus for on-board I2C peripherals. The V1 shares the same bus for on-board and external I2C devices — see the V1 tab for reserved addresses.

I2C accessories​

If you make an accessory for the micro:bit, please help us by editing the table below and sharing the details of the I2C addresses you use.

accessory nameorganisationI2C address(es) used
EDU:BITCytron Technologies0x08 (0x10/0x11)

Acceptable capacitance for I2C accessories​

In our recent testing for the motion sensor change, we found that a 10nF cap connected SCL-GND slowed down the I2C bus, but it continued to operate. Separately, capacitance was added to SDA until it ceased operation:

  • 100KHz continued with 1nF but failed with 2nF.
  • 400kHz continued with 150pF but failed with 180pF.

No difference was seen between the revisions.

Notes​

The V2 device can be woken by activating (by pulling low) the combined sensor interrupt on P0.25. This open drain signal is connected between the target MCU, the Interface MCU, and motion sensors and requires the target MCU internal pull up to be configured, even while the device is sleeping.