Main Content

SPI Communication

Communication using the SPI interface

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. Using Instrument Control Toolbox™ SPI support, you can open connections with individual chips and read and write over the connections.

Create the interface object using the spi function, and use the read and write functions for communication. To use the SPI interface, you must have a Total Phase Aardvark host adaptor or an NI-845x adaptor board installed. See Configuring SPI Communication for details.

Functions

instrhwinfoInformation about available hardware
spiCreate SPI object
readRead binary data from SPI instrument
writeWrite binary data to SPI instrument
writeAndReadWrite and read binary data from SPI instrument
methodsClass method names and descriptions
dispDisplay instrument object summary information
connectConnect device object to instrument
disconnectDisconnect device object from instrument
clearRemove instrument objects from MATLAB workspace

Topics

Troubleshooting

Troubleshooting SPI Interface

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