Instructions
344Libraries
© 2013 Conrad Electronic
selected that meets the desired clock rate closest: divider = 66Mhz / speed. The actual speed is then
66Mhz / divider. As a result, baud rates less than 259000 may not be used.
Parameter
chan SPI channel (0 - 1)
speed SPI baud rate (259000 - 66000000)
bits number of data bits
mode SPI mode
SPI Mode
CPOL
NCPHA
0
0
1
1
0
0
2
1
1
3
1
0
5.23.2.3 SPI_Read
SPI Functions
Syntax
word SPI_Read();
Sub SPI_Read() As Word
Description
Data is read from the SPI interface.
Return Parameter
received data (4-16 Bit) from the SPI interface
5.23.2.4 SPI_ReadBuf
SPI Functions
Syntax
void SPI_ReadBuf(byte buf[], word length);
Sub SPI_ReadBuf(ByRef buf As Byte, length As Word)
Description
A number of bytes is read from the SPI interface into an array. The functions works with up to 8 bits, regard-