SPI Write for Arduino

Target Category: Arduino

Target Sub-Category: SPI

Description: The SPI Write for Arduino block is a serial peripheral interface block for transmitting data to an Arduino board. The SPI queue is interrupt driven. You can write as many bytes as are free in the transmit queue and the interrupt handler will send the bytes out automatically. You can query the current transmit queue length using the SPI Read for Arduino block.

Use SPI Config for Arduino to configure the hardware settings.

Additional Information: See the Embed SPI Transmission Forum entry.

Input Type: Specifies the input data type.

Inserted data bit order: Sets the bit transmission order.

Slave Select/Arduino Pin: Selects the pin for the Slave Select signal. The default Slave Select pin is PB2 (Uno) and PB0 (Leonardo and Mega). You can verify the default Slave Select pin in the SPI Config for Arduino dialog box under Mux Pin Assignment. Click here for Arduino pin mapping.

Slave Select after send: Specifies the SS pin state upon completion of the byte transfer. The SS pin is set to LOW at the beginnning of the transmission. It is set to the selected value after the transmission ends. In this way, you can send multi-byte words by keeping the SS pin LOW until the final byte.

Tx Bytes: Indicates the number of bytes transmitted.