Datasheet

TWI_Busy
TWI_Start
TWI_Read
531
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
char TWI_Busy();
Returns Returns 0 if TWI start sequnce is finished, 1 if TWI start sequnce is not finished.
Description Signalizes the status of TWI bus.
Requires TWI must be configured before using this function. See TWI_Init.
Example
if (TWI_Busy == 1) {
...
Prototype
char TWI_Start();
Returns If there is no error function returns 0, otherwise returns 1.
Description Determines if TWI bus is free and issues START signal.
Requires TWI must be configured before using this function. See TWI_Init.
Example
if (TWI_Start == 1) {
...
Prototype
char TWI_Read(char ack);
Returns Returns one byte from the slave.
Description
Reads one byte from the slave, and sends not acknowledge signal if parameter
ack is 0, otherwise it sends acknowledge.
Requires
TWI must be configured before using this function. See TWI_Init.
Also, START signal needs to be issued in order to use this function. See
TWI_Start.
Example
Read data and send not acknowledge signal:
tmp = TWI_Read(0);