
ML674001 Seies/ML675001 Series User’s Manual
Chapter 20
I2C
20-16
20.3.5
Restart sequence transmit operation
To change the communication destination or the transfer direction in the middle of transmission/reception of
continuous data (without releasing the bus), it is necessary to transmit the restart sequence followed by a new
slave address and a transfer direction.
In this LSI, the transmission of the restart sequence is designated by
setting the I2CEN bit (bit 0 of the I2CCON register) to "1."
20.3.6
To receive 1-byte of data from another slave device after transmitting 1-byte of data:
Step
at the time of 1-byte transmit operation is performed.
Step
at the time of transmit operation of 2 or more bytes is performed.
To specify a new communication destination, the address of the new communication destination (slave) is
specified to SAD[6:0] of the I2CSAD register, and to set the transfer direction as reception, the I2CRW bit is
set to "1"(received by the master device).
The I2CCON register is set to XXX0X101.
The following series of operations is automatically performed
when both the I2CEN bit (bit 0 of the I2CCON register) and the STCM bit (bit 2 of the I2CCON register) are
set to "1": Transmission of the restart sequence, transmission of the new slave address and the transfer
direction specified to the I2CSAD register, confirmation of an acknowledge from the slave device for the
address transmitted, and storage of 8-bit data transmitted from the slave device into the I2CDR register.
Also, transmission of an acknowledge for the subsequent data received if the I2COC bit (bit 1 of the
I2CCON register) is set to "0" for continuous communication.
The stop sequence is transmitted (the bus is
released), and communication is then finished.
At this point, the I2CIR bit is set to "1," indicating that the
reception of 1-byte of data has been finished.
The data received can be retrieved by reading the I2CDR
register.
If an acknowledge for the address transmitted has not been returned normally, the I2CAAK bit is
set to "1" upon completion of reception.
I2CSAD
I2CIR = 1
(I2CAAK = 0)
(I2CDR = 0)
Flag
Register
settings
I2CIR = 1
(I2CAAK = 0)
I2CDR
I2CSAD
I2CSAD = xxxxxxx0b
I2CDR = xxxxxxxxb
I2CCON = xxx0x110b
I2CSAD = xxxxxx1b
I2CCON = xxx0x101b
To receive continuously,
I2CCON = xxx0x111b
S B
7
B
6
B
5
B
4
B
3
B
2
B
1
A B
7
B
6
B
5
B
4
B
3
B
2
B
1
B
0
A S
r
B
7
B
6
B
5
B
4
B
3
B
2
B
1
A B
7
B
6
B
5
B
4
B
3
B
2
B
1
B
0
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