Mikroelektronika MIKROE-742 데이터 시트

다운로드
페이지 532
Soft_I2C_Write
Soft_I2C_Stop
354
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Prototype
function Soft_I2C_Write(_data: byte): 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
2
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
var _data, error : byte;
...
error := Soft_I2C_Write(data);
error := Soft_I2C_Write(0xA3);
Prototype
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();