Configure I2C Controller Board Communication
You must have either a Total Phase®
Aardvark™ or an NI™ USB-845x installed to use the aardvark or
ni845x interface.
Configure Total Phase Aardvark
To use the I2C interface with the Aardvark controller board in MATLAB®, you must have the necessary files installed.
Download the Instrument Control Toolbox™ Support Package for Total Phase Aardvark I2C/SPI™ Interface as described in Install Instrument Control Toolbox Support Package for Total Phase Aardvark I2C/SPI Interface.
Download the USB device driver from the Total Phase website at Available Software Downloads.
Ensure that the Aardvark controller board is installed properly by scanning for boards physically connected to your computer.
list = aardvarklist
list =
1×2 table
Model SerialNumber
______________________ ____________
1 "Total Phase Aardvark" "2239143731" Connect to the Aardvark controller board in MATLAB by creating an aardvark object using the aardvark function.
controller = aardvark(list.SerialNumber(1))
controller =
Aardvark with properties:
Model: "Total Phase Aardvark"
SerialNumber: "2239143731"
AvailableDigitalPins: ["Pin1" "Pin3" "Pin5" "Pin7" "Pin8" "Pin9"]
Show all properties, functionsYou can see the model name and serial number of the Aardvark. For a full list of
properties, click Show all properties in the object output
display. For information about each of these properties, see Properties.
Configure and communicate with the digital I/O pins on the controller board using the following functions.
To connect to an I2C peripheral device connected to the Aardvark, you must use the
device function.
Configure NI USB-845x
To use the I2C interface with the NI USB-845x controller board, you must have a driver installed for it.
If you do not have the NI-845x driver installed, follow the instructions at Install Instrument Control Toolbox Support Package for National Instruments NI-845x I2C/SPI Interface. If you already have the latest driver installed, you do not need to download this support package.
Ensure that the NI USB-845x controller board is installed properly by scanning for boards physically connected to your computer.
list = ni845xlist
list =
1×2 table
Model SerialNumber
_____________ ____________
1 "NI USB-8452" "01F26E0A" Connect to the NI USB-845x controller board in MATLAB by creating an ni845x object using the ni845x function.
controller = ni845x(list.SerialNumber(1))
controller =
NI845x with properties:
Model: "NI USB-8452"
SerialNumber: "01F26E0A"
AvailableDigitalPins: ["P0.0" "P0.1" "P0.2" "P0.3" "P0.4" "P0.5" "P0.6" "P0.7"]
Show all properties, functionsYou can see the model name and serial number of the NI USB-845x. For a full list of properties, click Show all
properties in the object output display. For information about each of
these properties, see Properties.
Configure and communicate with the digital I/O pins on the controller board using the following functions.
To connect to an I2C peripheral device connected to the NI USB-845x, you must use the device function.