User manual
394
mikoBasic PRO for PIC32
MikroElektronika
Soft_SPI_Init
Prototype
sub 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 dened before using this function.
Example
‘ DAC module connections
dim SoftSpi_CLK as sbit at LATF6_bit
dim SoftSpi_SDI as sbit at RF2_bit
dim SoftSpi_SDO as sbit at LATF3_bit
dim SoftSpi_CLK_Direction as sbit at TRISF6_bit
dim SoftSpi_SDI_Direction as sbit at TRISF2_bit
dim SoftSpi_SDO_Direction as sbit at TRISF3_bit
‘ End DAC module connections
...
Soft_SPI_Init() ‘ Init Soft_SPI
Notes None.