Main Content

SPI Interface Overview

SPI Communication

SPI, or Serial Peripheral Interface, is a synchronous serial data link standard that operates in full duplex mode. It is commonly used in the test and measurement field. Typical uses include communicating with micro controllers, EEPROMs, A2D devices, embedded controllers, etc.

Instrument Control Toolbox™ SPI support lets you open connections with individual chips and to read and write over the connections to individual chips using an Aardvark or NI-845x host adaptor.

The primary uses for the spi interface involve the write, read, and writeAndRead functions for synchronously reading and writing binary data. To identify SPI devices in Instrument Control Toolbox, use the instrhwinfo function on the SPI interface, called spi.

Supported Platforms for SPI

You need to have either a Total Phase Aardvark host adaptor or an NI-845x adaptor board installed to use the spi interface. The following sections contain the supported platforms for each option.

Using Aardvark

The SPI interface is supported on these platforms when used with the Aardvark host adaptor:

  • Linux® — Red Hat® Enterprise Linux 4 and 5 with kernel 2.6, and possibly SUSE® and Ubuntu distributions.

  • Microsoft® Windows® 64-bit

Note

For R2018b and R2018a, you cannot use the Aardvark adaptor for I2C or SPI interfaces on the macOS platform. You can still use it on Windows and Linux. For releases prior to R2018a, you can use it on all three platforms, including the Mac.

Using NI-845x

The SPI interface is supported on these platforms when used with the NI-845x host adaptor:

  • Microsoft Windows 64-bit