SW006010 Microchip Technology, SW006010 Datasheet - Page 25

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.
getcI2C
Function:
File Name:
getsI2C
Device:
Function:
Include:
Prototype:
Arguments:
Remarks:
Return Value:
File Name:
Code Example:
This function operates identically to ReadI2C.
#
define in i2c16.h
PIC17C756
This function is used to read a predetermined data string length
from the I
i2c16.h
unsigned char getsI2C (static unsigned char far *rdptr, static
unsigned char length);
rdptr
Character type pointer to PICmicro RAM for storage of data
read from I
length
Number of bytes to read from I
Master I
length from the I
getcI2C function. The actual called function body is termed
ReadI2C. ReadI2C and getcI2C refer to the same function via a
#define
Slave I
length from the I
SSPBUF
adjusted so as to prevent the slave from waiting forever for data
reception.
Master I
sent.
Slave I
timed-out waiting for a data byte else it returns 0 if the master
I
getsi2c.c
unsigned char string[15];
unsigned char far *ptrstring;
ptrstring = string;
getsI2C(ptrstring, 15);
2
C device sent a Not Ack condition.
2
2
C mode: This routine reads a predefined data string
register. There is a time-out period which can be
C mode: This function returns -1 if the slave device
2
2
statement in the
2
C mode: This routine reads a predefined data string
C mode: This function returns 0 if all bytes have been
Hardware Peripheral Library
C bus.
2
C device.
2
2
C bus. Each byte is retrieved via a call to the
C bus. Each byte is retrieved by reading the
i2c16.h
2
C device.
file.
apRNOVS^-page 21

Related parts for SW006010