Mikroelektronika MIKROE-738 Datenbogen

Seite von 682
422
mikoC PRO for PIC32
MikroElektronika
Soft_SPI_Init
Prototype
void Soft_SPI_Init();
Description Routine initializes the software SPI module.
Parameters None.
Returns
Nothing.
Requires
Global variables:
SoftSpi_SDI
: Data in line 
SoftSpi_SDO
: Data out line 
SoftSpi_CLK
: Data clock line 
SoftSpi_SDI_Direction
: Direction of the Data in pin 
SoftSpi_SDO_Direction
: Direction of the Data out pin 
SoftSpi_CLK_Direction
: Direction of the Data clock pin 
must be defined before using this function. 
Example
// Software SPI module connections
sbit SoftSpi_SDI at RF4_bit;
sbit SoftSpi_SDO at LATF3_bit;
sbit SoftSpi_CLK at LATF6_bit;
sbit SoftSpi_SDI_Direction at TRISF4_bit;
sbit SoftSpi_SDO_Direction at TRISF3_bit;
sbit SoftSpi_CLK_Direction at TRISF6_bit;
// End Software SPI module connections
...
Soft_SPI_Init(); // Init Soft_SPI
Notes
None