SW006010 Microchip Technology, SW006010 Datasheet - Page 53

no-image

SW006010

Manufacturer Part Number
SW006010
Description
MPLAB 17C SOFTWARE
Manufacturer
Microchip Technology
Datasheets

Specifications of SW006010

Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC17C
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
MPLAB®
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
 2002 Microchip Technology Inc.
getsSPI (Continued)
Arguments:
Remarks:
Return Value:
File Name:
Code Example:
OpenSPI
Device:
Function:
Include:
Prototype:
Arguments:
Remarks:
Return Value:
File Name:
Code Example:
rdptr
Character type pointer to PICmicro RAM area for placement of
data read from SPI device.
length
Number of bytes to read from SPI device.
This function reads in a predetermined data string length from
the SPI bus. The length of the data string to read in is passed
as a function parameter. Each byte is retrieved via a call to the
getcSPI function. The actual called function body is termed
ReadSPI. ReadSPI and getcSPI refer to the same function via
a
None
getsspi.c
unsigned char far *wrptr;
getsSPI(wrptr, 10);
PIC17C756
Initializes the SSP module.
spi16.h
void OpenSPI (static unsigned char sync_mode, static
unsigned char bus_mode, static unsigned char
smp_phase);
The value of sync_mode, bus_mode and smp_phase
parameters can be one of the following values defined in
spi16.h
sync_mode
FOSC_4SPI
FOSC_16SPI
FOSC_64SPI
FOSC_TMR2SPI
SLV_SSONSPI
SLV_SSOFFSPI
bus_mode
MODE_00
MODE_01
MODE_10
MODE_11
smp_phase
SMPEND
SMPMID
This function setups the SSP module for use with a SPI bus
device.
None
openspi.c
OpenSPI(FOSC_16, MODE_00, SMPEND);
#define
:
Hardware Peripheral Library
statement in the
Master mode, clock = F
Master mode, clock = F
Master mode, clock = F
Master mode, clock = TMR2 output/2
Slave mode, /SS pin control enabled
Slave mode, /SS pin control disabled
Setting for SPI bus Mode 0,0
Setting for SPI bus Mode 0,1
Setting for SPI bus Mode 1,0
Setting for SPI bus Mode 1,1
Input data sample at end of data out
Input data sample at middle of data out
spi16.h
file.
OSC
OSC
OSC
apRNOVS^-page 49
/4
/16
/64

Related parts for SW006010