User manual

384
mikoPascal PRO for PIC32
MikroElektronika
Soft_SPI_Init
Prototype
procedure 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 dened before using this function.
Example
// Software SPI module connections
var SoftSpi_SDI : sbit at RF2_bit;
var SoftSpi_SDO : sbit at LATF3_bit;
var SoftSpi_CLK : sbit at LATF6_bit;
var SoftSpi_SDI_Direction : sbit at TRISF2_bit;
var SoftSpi_SDO_Direction : sbit at TRISF3_bit;
var SoftSpi_CLK_Direction : sbit at TRISF6_bit;
// End Software SPI module connections
...
Soft_SPI_Init(); // Init Soft_SPI
Notes None