Datasheet
Programming PIC Microcontrollers in BASIC - mikroElektronika
<Low_To_High> determines transmit edge for data:
● LOW_2_HIGH : data transmit on low to high edge
● HIGH_2_LOW : data transmit on high to low edge
Example
SPI_Init_Advanced(Master_OSC_div4, Data_SAMPLE_MIDDLE, CLK_Idle_LOW,
LOW_2_HIGH)
' This will set SPI to:
' master mode,
' clock = Fosc/4,
' data sampled at the middle of interval,
' clock idle state low,
' data transmitted at low to high edge.
5.2.15.3 SPI_Read – Reads the received data
Prototype sub function SPI_Read(dim Buffer as byte) as byte
Description Routine provides clock by sending <Buffer> and reads the received data at the end of the period.
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (96 sur 112)05/11/2004 02:20:55