EasyManuals Logo

Abov MC97F6108A User Manual

Default Icon
256 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 #177 background imageLoading...
Page #177 background image
MC97F6108A User’s manual 16. Inter Integrated Circuit (I2C)
177
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 MC97F6108A and is the answer not in the manual?

Abov MC97F6108A Specifications

General IconGeneral
BrandAbov
ModelMC97F6108A
CategoryMicrocontrollers
LanguageEnglish

Related product manuals