Datasheet
Library Routines
- Soft_I2C_Init 
- Soft_I2C_Start 
- Soft_I2C_Read 
- Soft_I2C_Write 
- Soft_I2C_Stop 
- Soft_I2C_Break 
Soft_I2C_Init
403
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
void Soft_I2C_Init();
Returns Nothing.
Description
Configures the software I
2
C module.
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 defined before using this function. 
Example
// Software I2C connections
sbit Soft_I2C_Scl_Output at PORTC.B0;
sbit Soft_I2C_Sda_Output at PORTC.B1;
sbit Soft_I2C_Scl_Input at PINC.B0;
sbit Soft_I2C_Sda_Input at PINC.B1;
sbit Soft_I2C_Scl_Direction at DDRC.B0;
sbit Soft_I2C_Sda_Direction at DDRC.B1;
// End Software I2C connections
...
Soft_I2C_Init();










