User manual

Table Of Contents
416
mikoC PRO for PIC32
MikroElektronika
Soft_I2C_Init
Soft_I2C_Start
Prototype
void Soft_I2C_Init();
Description Congures the software I²C module.
Parameters None.
Returns Nothing.
Requires Global variables:
- Soft_I2C_Scl: Soft I²C clock line
- Soft_I2C_Sda: Soft I²C data line
- Soft_I2C_Scl_Pin_Direction: Direction of the Soft I²C clock pin
- Soft_I2C_Sda_Pin_Direction: Direction of the Soft I²C data pin
must be dened before using this function.
Example
// Software I2C connections
sbit Soft_I2C_Scl at RB11_bit;
sbit Soft_I2C_Sda at RB12_bit;
sbit Soft_I2C_Scl_Direction at TRISB11_bit;
sbit Soft_I2C_Sda_Direction at TRISB12_bit;
// End Software I2C connections
...
Soft_I2C_Init();
Notes None
Prototype
void Soft_I2C_Start();
Description Determines if the I²C bus is free and issues START signal.
Parameters None.
Returns Nothing.
Requires Software I²C must be congured before using this function. See Soft_I2C_Init routine.
Example
// Issue START signal
Soft_I2C_Start();
Notes None