Skip to content

Latest commit

 

History

History
74 lines (44 loc) · 3.83 KB

README.md

File metadata and controls

74 lines (44 loc) · 3.83 KB

I²C / I2C / IIC

I²C (Inter-Integrated Circuit), pronounced I-squared-C or I-two-C, is a multi-master, multi-slave, packet switched, single-ended, serial computer bus.

IMPORTANT

The I2C standard is based on 5V, but most devices these days are designed to work between 3.3V and 5V due to the growing trend towards lower power devices.

The UX2 Bus is based on an operating voltage of 3.3V and would likely be damaged by higher voltages.

If you encounter an I2C device that requires 5V, you can use a Level Shifter to safely interface to it.

If there is a risk of voltage spikes, you can use a Power Isolator which can protect against voltages up to 1KV.

Pin Variants

UX2-GPIO – 1 x I2C, 4 x GPIO, 1 x UART, 1 x SPI:

UX2-GPIO

UX2-1IS – 1 x I2C, 1 x 1-WIRE, 1 x INTERRUPT, 1 x UART, 1 x SPI, 1 x SOUND-WIRE:

UX2-1IS

UX2-ALT – 2 x I2C, 2 x GPIO, 1 x UART, 1 x SPI:

UX2-ALT

UX2-I2C – 3 x I2C, 1 x UART, 1 x SPI:

UX2-I2C

Wiring

The I2C standard uses 4 wires; SDA (data), SCL (clock), 3V3 and GND:

UX2 I2C
SDAx SDA (data)
SCLx SCL (clock)
3V3 VCC
GND GND

It's important to use the same interface pair for each I2C bus. For example, if you're using the UX2-I2C pin variant which provides 3 x I2C interfaces, you could use SDA1 and SCL1 together as a pair, but not SDA1 and SCL2 (SCL2 must be paired with SDA2).

Each interface pair (I2C Bus) can host multiple slave devices. Usually one I2C bus will suffice, but it can be useful to use more than one, for example if two devices have the same address you can put them on separate busses.

Topology

An I2C bus can have several devices attached to it in a linear topology:

I2C Linear Topology

There are multiplexer and switch ICs which provide more advanced topologies should the need arise.

The maximal number of nodes is limited by the address space and also by the total bus capacitance of 400 pF, which restricts practical communication distances to a few meters.

There are ICs which change I2C address to help overcome cases where multiple devices with the same address are required.

You can extend the range of an I2C network using an Extender Module (essentially a repeater node) or even with some clever, wiring.

See also: