SW006010 Microchip Technology, SW006010 Datasheet - Page 78

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
MPLAB
3.4
apRNOVS^-page 74
SOFTWARE I²C FUNCTIONS
C17 C Compiler Libraries
This section contains a list of individual functions and an example of use of the functions
in this section. Functions may be implemented as macros.
3.4.1
Clock_test
Device:
Function:
Include:
Prototype:
Arguments:
Remarks:
Return Value:
File Name:
Code Example:
SWAckI2C
Device:
Function:
Include:
Prototype:
Arguments:
Remarks:
Function Descriptions
PIC17CXXX
Generates delay for slave clock stretching.
swi2c16.h
void Clock_test (void);
None
This function is called to allow for slave clock stretching. The
delay time may need to be adjusted per application
requirements. If at the end of the delay period the clock line is
low, a bit field in the global structure
(
of the delay, this bit field is a 0.
far ram union i2cbus_state
{
} BUS_STATUS; define union/struct
None
swckti2c.c
Clock_test();
PIC17CXXX
Generates I
swi2c16.h
void SWAckI2C (void);
None
This function is called to generate an I
sequence. A bit field in the global structure
(
This error condition could also indicate a bus error on the SDA
line. If no error occurred this bit field is a 0.
BUS_STATUS.clk
BUS_STATUS.ack
struct
{
};
unsigned char dummy; dummy variable
unsigned busy :1; bus state is busy
unsigned clk
unsigned ack
unsigned
2
C bus acknowledge condition.
) is set to 1. If the clock line is high at the end
) is set to 1 if the slave device did not ack.
:1; clock timeout or
:1; acknowledge error or
:5; bit padding
failure
not ACK
BUS_STATUS
 2002 Microchip Technology Inc.
2
C bus acknowledge
BUS_STATUS

Related parts for SW006010