I2C information for internal and external bus
I2C information for internal and external 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
Table of addresses used
accelerometer | magnetometer (compass) | Interface Mng | Interface 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) |
While the micro:bit V2 has a dedicated bus for the on-board I2C peripherals, the micro:bit V1 shares the same bus for on-board and external I2C devices. Please check the V1 shared bus documentation to check the reserved I2C addresses.
Table of address used by micro:bit accessories (please edit)
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 name | organisation | I2C address(es) used |
---|---|---|
EDU:BIT | Cytron Technologies | 0x08 (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.