SPI Express VI
- Updated2023-02-21
- 3 minute(s) read
Requires: myRIO Toolkit or roboRIO Toolkit
Writes data to or reads data from a serial peripheral interface (SPI) slave device through the SPI channels on the myRIO or the roboRIO.
In addition to the SPI channels on the MXP port, the roboRIO also has an SPI port. The SPI port contains four chip select (CS) lines to support up to four slave devices. You also can use the CS lines as DIO lines. The roboRIO uses a 3.3 V voltage rail on the SPI port for powering SPI peripherals and provides 3.3 V DIO lines for generating SPI signals.
| Dialog Box Options |
| Block Diagram Inputs |
| Block Diagram Outputs |
Dialog Box Options
| Parameter | Description |
|---|---|
| Node name | Specifies the name of this Express VI. You can also double-click the name of this Express VI on the expandable node to edit the name. |
| Channel | Specifies the SPI channel to which to write data to or read data from an SPI slave device. |
| Connections | Shows the myRIO or roboRIO pins that correspond to the SPI logic signals. |
| Mode | Specifies the mode of operation that this Express VI uses to communicate with the SPI slave device. Mode contains the following options:
|
| Frequency | Specifies the frequency of the generated clock signal. If you specify a frequency that is invalid, this Express VI coerces the specified value to the nearest valid value when you click the Validate button.
|
| Frame length | Specifies the number of bits that make up one SPI transmission frame. The default is 8 bits. |
| Advanced options | Specifies advanced configuration options for communicating with the SPI slave device.
|
| View Code | Displays the underlying code of this Express VI. |
| Connection Diagram | Shows the I/O connector pinouts on the myRIO or the roboRIO. The highlighted pinouts represent the channels that you configure. |
Block Diagram Inputs
| Parameter | Description |
|---|---|
| Frames to Write | Specifies the data to write to the SPI slave device. You can write multiple frames to the device at the same time. This input is available when you set Mode to Write or Write/Read. |
| Frame Count | Specifies the number of frames to read from the SPI slave device. This input is available when you set Mode to Read. |
| error in (no error) | Describes error conditions that occur before this node runs. |
Block Diagram Outputs
| Parameter | Description |
|---|---|
| Frames Read | Returns the data frames that this Express VI reads from the SPI channel. This output is available when you set Mode to Read or Write/Read. |
| error out | Contains error information. This output provides standard error out functionality. |
SPI Details
Related Information
I/O Connectors (myRIO Toolkit)
I/O Connectors (roboRIO Toolkit)
Generating FPGA Clocks (myRIO Toolkit)
Generating FPGA Clocks(roboRIO Toolkit)