Datasheet
Soft_I2C_Write
Soft_I2C_Stop
405
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
unsigned short Soft_I2C_Write(unsigned short Data_);b
Returns
- 0 if there were no errors.
- 1 if write collision was detected on the I˛C bus.
Description
Sends data byte via the I˛C bus.
Parameters :
-
Data: data to be sent
Requires
Soft I˛C must be configured before using this function. See Soft_I2C_Init routine.
Also, START signal needs to be issued in order to use this function. See
Soft_I2C_Start routine.
Example
unsigned short data, error;
...
error = Soft_I2C_Write(data);
error = Soft_I2C_Write(0xA3);
Prototype
void Soft_I2C_Stop(void);
Returns Nothing.
Description Issues STOP signal.
Requires
Soft I
2
C must be configured before using this function. See Soft_I2C_Init routine.
Example
// Issue STOP signal
Soft_I2C_Stop();