ABL electronic PIC12 Personal Computer User Manual


 
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
26 8
MikroElektronika:
Development
tools
-
Books
-
Compilers
page
Prototype
char Spi_Read(char buffer);
Returns Returns the received data.
Description Provides clock by sending buffer and receives data at the end of period.
Requires SPI must be initialized and communication established before using this function. See
Spi_Init_Advanced or Spi_Init.
Example
short take, buffer;
...
take = Spi_Read(buffer);
Spi_Read
Prototype
void Spi_Write(char data);
Description Writes byte data to SSPBUF, and immediately starts the transmission.
Requires SPI must be initialized and communication established before using this function. See
Spi_Init_Advanced or Spi_Init.
Example
Spi_Write(1);
Spi_Write