Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

I2C Communication

Communication using the I2C interface

I2C, or Inter-Integrated Circuit, is a chip-to-chip interface supporting two-wire communication. You can open connections with individual chips and read and write over the connections. Create the interface object using the i2c function, and use the fread and fwrite functions for communication.

To use the I2C interface, you need to have either a Total Phase Aardvark host adaptor or a NI-845x adaptor board installed. See Configuring I2C Communication for more details.

Functions

i2cCreate I2C object
clearRemove instrument objects from MATLAB workspace
deleteRemove instrument objects from memory
dispDisplay instrument object summary information
fcloseDisconnect interface object from instrument
fopenConnect interface object to instrument
freadRead binary data from instrument
fwriteWrite binary data to instrument
getInstrument object properties
instrhwinfoInformation about available hardware
methodsClass method names and descriptions
recordRecord data and event information to file
setConfigure or display instrument object properties

Examples and How To

Configuring I2C Communication

You need to have either a Total Phase Aardvark host adaptor or a NI-845x adaptor board installed to use the i2c interface. These sections describe configuration for each option.

Transmitting Data Over the I2C Interface

Communicating over the I2C interface involves adaptor discovery, connection, communication, and cleanup.

Using Properties on an I2C Object

You can access and set interface-specific properties that can be used with the i2c object.

Install the NI-845x I2C/SPI Interface Support Package

For the Instrument Control Toolbox™ I2C and SPI interfaces, you can use either a Total Phase Aardvark host adaptor or an NI-845x adaptor.

Concepts

I2C Interface Overview

Instrument Control Toolbox I2C support lets you open connections with individual chips and to read and write over the connections to individual chips.

I2C Interface Usage Requirements and Guidelines

These tips and guidelines apply to the use of the I2C interface.

Instrument Control Toolbox Properties

These properties are available in the toolbox.

Troubleshooting

Troubleshooting I2C Interface

Try these tips if you have problems using the toolbox with the I2C interface. Includes information about I2C supported platforms, adaptor requirements, and configuration and connection.

Was this topic helpful?