![](http://datasheet.mmic.net.cn/110000/ML674001TC_datasheet_3507949/ML674001TC_336.png)
ML674001 Seies/ML675001 Series User’s Manual
Chapter 20
I2C
20-12
20.3 Operations
The following is a function description of the I2C block operation. Through out this section, I2C bus transfer
illustrations are used as visual aides. Use the following legend for all of the illustrations in this section.
20.3.1
Transmit operation (transfer of 1 byte from master to slave, in 7-bit address mode)
To identify the communication destination, the address of the communication destination (slave) is written to
SAD[6:0] of the I2CSAD register, and to set the transfer direction as transmission, the I2CRW bit is set to
"0" (transmitted by the master device).
Write transmit data to the I2CDR register.
The I2CCON register is set to XXX0X100.
The following series of operations is automatically performed
when the STCM bit (bit 2 of the I2CCON register) is set to "1": Transmission of the start sequence (to attain
bus access), transmission of the slave address and the transfer direction specified to the I2CSAD register,
confirmation of an acknowledge from the slave device for the address transmitted, transmission of the
transmit data written to the I2CDR register, and confirmation of an acknowledge from the slave device for
the data transmitted.
Also, when the I2COC bit (bit 1 of the I2CCON register) is set to "0", the stop
sequence is successively transmitted (the bus is released) and communication is then finished.
At this
point, the I2CIR bit is set to "1," indicating that the transmission of 1-byte of data has been finished.
If
acknowledges for the address and data transmitted have not been returned normally, both the I2CAAK and
I2CDAK bits are set to "1" upon completion of transmission.
I2CSAD = xxxxxxx0b
I2CDR = xxxxxxxxb
I2CCON = xxx0x100b
Register
settings
Transmission complete
I2CSAD
I2CDR
Flag
I2CIR = 1
(I2CAAK = 0)
(I2CDAK = 0)
S B
7
B
6
B
5
B
4
B
3
B
2
B
1
B
0
A B
7
B
6
B
5
B
4
B
3
B
2
B
1
A P
Output
S
P
S
r
A
Input
Start
sequence
Stop
sequence
Restart
sequence
Acknowledge
received
Negative
acknowledge
received
Acknowledge
transmitted
Negative
acknowledge
transmitted