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 #176 background imageLoading...
Page #176 background image
16. Inter Integrated Circuit (I2C) MC97F6108A User’s manual
176
16.7.3 Master transmitter
Main software is to have write/read data to/from slave I2C device. The software has to be ready to get
number of data with internal RAM or sending data on internal RAM according to I2C bus protocol type
of Slave device. It writes Salve Address to I2CDR register in I2C Block and then if it set START bit on
I2CMR register I2C block send slave address with SCL clock to slave device. I2C Block takes master
mode (MASTER bit -> 1) and take the read/write state (TMODE bit, read(0), write(1)) according to the
data direction bit (R/Wî¡­) of device address.
The following is examples software for the case of master mode
Master Write
I2CMR = IICEN+INTEN; // set I2C block( enable IIC block, I2C interrupt)
I2CDR = Slave Address + Write mode; // load target Salve Address
I2CMR |= SRT; // generate start condition and send slave address
I2C Interrupt Service
If(Master Mode) and (TMODE)
If( ACK and GCALL or ACK and TEND )
If ( Not End of Data )
I2CDR = NEXT DATA; // load target Salve Address
I2CSR = 0xFF; // Byte transmit start
ELSE
I2CMR = IICEN+INTEN+STP; // STOP generation
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