Attention: this is a legacy library and thus not supported by Toradex anymore. We recommend that you use the new libraries for all Toradex modules. Please see the Toradex CE Libraries and Code Samples for up-to-date information.
I2C Library provides easy access to I2C interface on Toradex module.
Use cases:
We provide free I2CLib including demo source code.
NOTE: Please use compatible I2C channel if you want to maintain compatibility between different Colibri modules.
VS2008 Project | VS2013 Project | VS2015 Project | Module compatibility | Language | Library Version |
---|---|---|---|---|---|
I2C | - | - | PXA / Tegra | C | Toradex CE Library (Old) |
I2C | I2C | I2C | Tegra /VFxx / iMX6 | C | Toradex CE Library (New) |
I2C | - | - | PXA / Tegra | C# | Toradex CE Library (Old) |
I2C | - | - | VFxx / iMX6 | C# | Toradex CE Library (New) |
Note: It is always recommended to update the libraries first before compiling the demo project. Click on this link to get latest libraries.
This application demonstrates the use of I2C library to read time, day of the week and date from the external Real Time Clock (available on Iris Carrier Board V1.1 , Colibri Evaluation Board V3.1 and Colibri Evaluation Board V3.2).
A schematic diagram of the setup can be seen here.
This demo explains how to use I2C library to perform read and write operations to an EEPROM chip. In this demo EEPROM 24C256 has been interfaced with Iris Carrier Board V1.1A.
The connections can be seen in the following schematic diagram.
NOTE: Pull-up resistors are already available on the Iris carrier board, so pull-up in the schematic of the EEPROM chip are not required, if used, will have no effect on performance.