EasyManuals Logo

Abov A96G166 User Manual

Default Icon
247 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #131 background imageLoading...
Page #131 background image
A96G166/A96A166/A96S166 User’s manual 14. I2C
131
Master Read ( without sub address of Slave device )
I2CMR = IICEN+INTEN; // start generate
I2CDR = Slave Address + Read mode; // load target Salve Address
I2CMR |= SRT; // generate start condition
-------------------------------------------------------------------------------------------
[I2C Interrupt Service]
If (Master mode) and ( TMODE)
If( ACK and GCALL )
I2CMR |= ACKEN // After receive data, generate ACK
I2CSR = 0xFF; // Byte transmit start
ELSE
if ACK and TEND )
If ( Not End of Data )
If(LAST Data)
I2CMR &= ~ACKEN // After receive data, generate ACK
I2C_buffer = I2CDR // read
I2CSR = 0xFF; // Byte transmit start
ELSE
If( ~ACK and TEND)
I2CMR = IICEN+INTEN+STP; // STOP generation
I2CSR = 0xFF; // Byte transmit start
ELSE
Initialize I2C block // if have ACK error, any error
End of I2C interrupt service

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Abov A96G166 and is the answer not in the manual?

Abov A96G166 Specifications

General IconGeneral
BrandAbov
ModelA96G166
CategoryComputer Hardware
LanguageEnglish

Related product manuals