Spi Library - mikroElektronika PIC Microcontrollers PIC12 User Manual

Mikroc user's manual
Table of Contents

Advertisement

mikroC - C Compiler for Microchip PIC microcontrollers

SPI Library

SPI module is available with a number of PIC MCU models. mikroC provides a
library for initializing Slave mode and comfortable work with Master mode. PIC
can easily communicate with other devices via SPI: A/D converters, D/A convert-
ers, MAX7219, LTC1290, etc. You need PIC MCU with hardware integrated SPI
(for example, PIC16F877).
Note: This library supports module on PORTB or PORTC, and will not work with
modules on other ports. Examples for PICmicros with module on other ports can
be found in your mikroC installation folder, subfolder "Examples".
Library Routines
Spi_Init
Spi_Init_Advanced
Spi_Read
Spi_Write
Spi_Init
Prototype
void Spi_Init(void);
Description
Configures and initializes SPI with default settings.
SPI_Init
Default settings are: Master mode, clock Fosc/4, clock idle state low, data transmitted on
low to high edge, and input data sampled at the middle of interval.
For custom configuration, use
Requires
You need PIC MCU with hardware integrated SPI.
Example
Spi_Init();
page
266
needs to be called before using other functions from SPI Library.
Spi_Init_Advanced
MikroElektronika: Development tools - Books - Compilers
making it simple...
or
SPI_Init_Advanced
.
mikroC

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PIC Microcontrollers PIC12 and is the answer not in the manual?

This manual is also suitable for:

Pic microcontrollers pic16Pic microcontrollers pic18

Table of Contents