Communication SPI
SPI (Serial Peripheral Interface) est une norme de liaison de données série synchrone qui fonctionne en mode full duplex. On l’utilise couramment dans le domaine des tests et des mesures. Ses utilisations typiques comprennent la communication avec des microcontrôleurs, des mémoires EEPROM, des dispositifs A2D, des contrôleurs embarqués, etc. Grâce au support SPI d’Instrument Control Toolbox™, vous pouvez ouvrir des connexions avec des puces individuelles et lire et écrire via ces connexions.
Créez l’objet interface avec la fonction spi et utilisez les fonctions read et write pour communiquer. Pour utiliser l’interface SPI, vous devez avoir installé un adaptateur hôte Total Phase Aardvark ou une carte adaptateur NI-845x. Pour plus d’informations, consultez Configuring SPI Communication.
Fonctions
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 |
Rubriques
- 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.
Résolution des problèmes
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.
