I²C controller and peripheral library
VERSION | RELEASED | COMMENTS | DOCUMENTATION | SOFTWARE |
---|---|---|---|---|
6.4.0 | 2024-11-11 | VIEW HTML VIEW PDF | ZIP | |
6.3.1 | 2024-10-31 | DOWNLOAD ZIP | ZIP | |
5.0.0rc3 | 2018-12-06 | DOWNLOAD | ZIP | |
4.0.0rc3 | 2016-11-03 | DOWNLOAD | ZIP | |
3.1.6rc1 | 2016-06-01 | DOWNLOAD | ZIP | |
3.1.4rc1 | 2016-02-26 | DOWNLOAD | ZIP | |
3.1.3rc1 | 2016-01-07 | DOWNLOAD | ZIP | |
3.1.1rc1 | 2015-06-03 | DOWNLOAD | ZIP | |
3.1.0rc1 | 2015-04-15 | DOWNLOAD | ZIP | |
3.0.0rc1 | 2015-03-22 | DOWNLOAD | ZIP |
Summary#
I²C (Inter-Integrated Circuit) is a multi-master, multi-slave, synchronous, serial communication protocol used for communication between integrated circuits on the same board. Developed by Philips, it requires only two lines: the SDA (Serial Data Line) for data transfer and SCL (Serial Clock Line) for clock signals. I²C is popular in applications for connecting low-speed peripherals like sensors, EEPROMs, and ADCs. It supports various data rates, typically up to 3.4 Mbps in Fast Mode Plus and Ultra-Fast Mode, and allows multiple devices to share the same bus.
lib_i2c
contains a software defined, industry-standard, I²C library that allows control of an
I²C bus via xcore ports.
lib_i2c
provides both controller (“master”) and peripheral (“slave”) functionality.
The I²C master component can be used by multiple tasks within the xcore device (each addressing the same or different peripheral devices).
The library can also be used to implement multiple I²C physical interfaces on a single xcore device simultaneously.
Features#
I²C controller (master) and I²C peripheral (slave) modes
Supports speed up to 400 Kb/s (I²C Fast-mode)
Clock stretching support
Synchronous and asynchronous APIs
Known issues#
The library has functions that wait on SCL high, through either an event or a polling loop. If these are called on a system where the pull up isn’t present then the application can hang forever.
Development repo#
Required tools#
XMOS XTC Tools: 15.3.0
Required libraries (dependencies)#
lib_xassert (www.github.com/xmos/lib_xassert)
Support#
This package is supported by XMOS Ltd. Issues can be raised against the software at www.xmos.com/support