Datasheet

Soft_I2C_Start
Soft_I2C_Read
404
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
void Soft_I2C_Start(void);
Returns Nothing.
Description
Determines if the I
2
C bus is free and issues START signal.
Requires
Software I
2
C must be configured before using this function. See Soft_I2C_Init
routine.
Example
// Issue START signal
Soft_I2C_Start();
Prototype
unsigned short Soft_I2C_Read(unsigned int ack);
Returns One byte from the Slave.
Description
Reads one byte from the slave.
Parameters :
-
ack: acknowledge signal parameter. If the ack==0 not acknowledge
signal will be sent after reading, otherwise the acknowledge signal will
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 take;
...
// Read data and send the not_acknowledge signal
take = Soft_I2C_Read(0);