InData = Spi(OutData, Bits)
|Bits||Number of bits (1 to 32)|
This command sends and receives data simultaneously. In contrast, the ShiftOut and ShiftIn commands only support either sending data (ShiftOut) or receiving data (ShiftIn), but not both. The Spi command can be used on any I/O port.
The Set Spi command must be used prior to the Spi command to ensure the I/O ports are defined prior to sending or receiving data.
Const Device = CB280 Dim Dtin as Byte Set Spi 9,8,7,0 Dtin = Spi(Dtout,32)