Main Content

I2C Communication

Communication using the I2C interface

I2C, or Inter-Integrated Circuit, is a chip-to-chip interface supporting two-wire communication. You can connect to I2C peripheral devices and read from and write to them. Create the interface object using the device function with an aardvark or ni845x object.

To use the I2C interface, you must have either a Total Phase® Aardvark I2C/SPI™ Host Adapter or an NI™ USB-8451 or USB-8452 I2C/SPI Interface Device installed.


expand all

aardvarklistList available Total Phase Aardvark controllers
aardvarkTotal Phase Aardvark Adapter connection
ni845xlistList available NI USB-845x controllers
ni845xNI USB-845x connection
scanI2CBusScan for I2C peripheral devices connected to controller board
deviceI2C peripheral device connection
configureDigitalPinSet digital pin mode on controller
readDigitalPinRead logic level value of digital pin on controller
writeDigitalPinWrite logic level value to digital pin on controller
readRead data from I2C peripheral device
writeWrite data to I2C peripheral device
readRegisterRead data from I2C peripheral device register
writeRegisterWrite data to I2C peripheral device register



Troubleshooting I2C Interface

Troubleshoot the I2C interface.