Datasheet

Soft_I2C_Write
Soft_I2C_Stop
341
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub function Soft_I2C_Write(dim _Data as byte) as byte
Returns
- 0 if there were no errors.
- 1 if write collision was detected on the I
2
C bus.
Description
Sends data byte via the I˛C bus.
Parameters :
-
_Data: data to be sent
Requires
Soft I
2
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
dim _data, error as byte
...
error = Soft_I2C_Write(data)
error = Soft_I2C_Write(0xA3)
Prototype
sub procedure Soft_I2C_Stop()
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()