write
Write binary data to SPI instrument
Syntax
Description
write(
writes the
data, s
,data
)data
, to the SPI instrument s
.
s
must be a 1-by-1 SPI interface object. You can specify
data
as any numeric data type, but the data is written to the SPI
device as a uint8
value.
The interface object must be connected to the device with the connect
function before any data can be read from or written to the device, otherwise an error is
returned. A connected interface object has a ConnectionStatus
property
value of connected.
The SPI protocol operates in full duplex mode, input and output data transfers happen simultaneously. For every byte written to the device, a byte is read back from the device. This function will automatically flush the incoming data.
Examples
Input Arguments
Version History
Introduced in R2013b