SPI-Kommunikation
SPI oder Serial Peripheral Interface ist ein synchroner serieller Datenverbindungsstandard, der im Vollduplexmodus arbeitet. Es wird häufig im Test- und Messbereich verwendet. Typische Verwendungszwecke sind die Kommunikation mit Mikrocontrollern, EEPROMs, A2D-Geräten, eingebetteten Controllern usw. Mithilfe der Instrument Control Toolbox™ SPI-Unterstützung können Sie Verbindungen mit einzelnen Chips öffnen und über die Verbindungen lesen und schreiben.
Erstellen Sie das Schnittstellenobjekt mit der Funktion spi und verwenden Sie die Funktionen read und write für die Kommunikation. Um die SPI-Schnittstelle zu verwenden, muss ein Total Phase Aardvark-Hostadapter oder eine NI-845x-Adapterkarte installiert sein. Weitere Einzelheiten finden Sie unter Configuring SPI Communication.
Funktionen
instrhwinfo | Information about available hardware |
spi | Create SPI object |
read | Read binary data from SPI instrument |
write | Write binary data to SPI instrument |
writeAndRead | Write and read binary data from SPI instrument |
methods | Class method names and descriptions |
disp | Display instrument object summary information |
connect | Connect device object to instrument |
disconnect | Disconnect device object from instrument |
clear | Remove instrument objects from MATLAB workspace |
Themen
- Configuring SPI Communication
You must have a Total Phase Aardvark host adaptor or an NI-845x adaptor board installed to use the
spiinterface. - Transmitting Data over the SPI Interface
The typical workflow for transmitting data over the SPI interface involves adaptor discovery, connection, communication, and cleanup. This example covers the whole workflow.
- Using Properties on the SPI Object
Use interface-specific properties with the
spiobject. - SPI Interface Overview
The 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.
- SPI Interface Usage Requirements and Guidelines
These requirements and tips apply to the use of the SPI interface.
Fehlersuche
Try these tips if you have problems using the toolbox with the SPI interface. Includes information about SPI supported platforms, adapter requirements, and configuration and connection.
