User Tools

Site Tools

한국어

cubloc:spi:index

Spi

InData = Spi(OutData, Bits)

InData Input data
OutData Input data
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)

Go CUBLOC home

cubloc/spi/index.txt · Last modified: 2016/04/14 11:07 (external edit)