I2C SPI USB CAN eSPI Cable Testing View All Quick Start Guides User Manuals Software Downloads Knowledge Base Videos Case Studies App Notes White Papers Sales Support About Us
Products Blog Sales Support Contact Search
Support Question of the Week: How Do You Transfer SPI Data Using the Aardvark I2C/SPI Host Adapter and LabVIEW?
Rena

Today's article is based on a new Knowledge Base article, Sending SPI Messages Between Two Aardvark adapters Using Aardvark LabVIEW.

The AardvarkTM I2C/SPI Host Adapter is often used with LabVIEW to transfer SPI data. The Aardvark LabVIEW Driver supports the Windows operating system and includes examples. You can use the Aardvark LabVIEW Driver to control the Aardvark adapter, as well as write a custom program for specific requirements. For information about API Software, which is also used to write custom software, please refer to section 5 of the Aardvark Adapter Use Manual.  Following are instructions to install the Aardvark LabVIEW driver and then run two examples that use Aardvark LabVIEW drivers (connect and spi):

  • connect example - Indicates if the I2C/SPI/GPIO functions are available, and displays the port number, Aardvark handle, Serial Number, Hardware version, and Firmware version for the connected Aardvark adapters.
  • spi example - Reads and writes SPI data between two Aardvark adapters. In this example, one Aardvark adapter is the SPI master and the other Aardvark adapter is the SPI slave.
Aardvark LabVIEW Driver Installation Guidelines:

  1. Download and run the latest version of the Total Phase USB Drivers Installer.
  2. Download and install the latest version of Aardvark LabVIEW Driver following the README file in the driver package.

    • Be sure to place the aardvark.dll into a directory that is listed in the system search path. The Windows system32 directory (on 32-bit Windows) is a good location for the aardvark.dll.
  3. Connect the two Aardvark adapters to the computer via the USB connector.
  4. Connect the two Aardvark adapters to each other via the I2C/SPI connector.
  5. Install 32-bit LabVIEW for Windows from the LabVIEW website.

    • Be sure to use 32-bit LabVIEW;  currently, the Aardvark LabVIEW Driver is only provided in a 32-bit package.
  6. Launch Aardvark LabVIEW Driver by clicking on the icon …/aardvark-labview-v5.03/aardvark/aardvark.llb.
  7. Run the original connect Aardvark LabVIEW Driver example as provided in the Aardvark LabVIEW Driver package. To do so:

    1. Go to the Aardvark Example Connect.vi window.
    2. Click Operate → Run.
    3. Verify that the computer detects the first Aardvark adapter, and that the Aardvark parameters are correct including: Aardvark Handle, Aardvark Port; Aardvark Serial Number String, Hardware Version String, and Firmware Version String. Refer to Figure 1 below.
Setting up Drivers for the Aardvark Host Adapter Figure 1: Setting up Drivers for the Aardvark Host Adapter
Instructions to send SPI data between two Aardvark adapters with the Aardvark LabVIEW Driver SPI.

  1. Go to the Aardvark LabVIEW Driver Example SPI.vi window.
  2. Click Operate → Run.
  3. Verify that the Aardvark parameters are correct including: Aardvark Handle 1, Aardvark Handle 2, Message received by master, and Message received by slave. Refer to Figure 2 below.
Sending SPI Data between Aardvark Host Adapters Figure 2: Sending SPI Data between Aardvark Host Adapters

Note: similar steps can be used for transferring SPI data between Aardvark adapter and another SPI device.

For more information, please refer to the following documents:

Aardvark Adapter User Manual

Aardvark I2C/SPI Host Adapter Quick Start Guide

LabVIEW Drivers for Aardvark

Sending SPI Messages Between Two Aardvark adapters Using Aardvark LabVIEW

Total Phase Products

Product Selector Guide

We hope this answers your question. If you have other questions about our host adapters or other Total Phase products, feel free to email us at sales@totalphase.com or submit a request for technical support.