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.

Functions

expand all

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

Topics

Troubleshooting

Troubleshooting I2C Interface

Troubleshoot the I2C interface.