R01UH0136EJ0210 Rev.2.10
Page 575 of 800
Jul 31, 2012
M16C/64A Group
25. Multi-master I
2
C-bus Interface
25.3.10.5 Slave Transmission
Slave transmission is described in this section. The initial settings described in 25.3.10.1 “Initial
Settings” are assumed to be completed. Figure 25.20 shows the example of slave transmission. The
following programs (A) to (B) are executed at (A) and (B) in Figure 25.20, respectively.
When arbitration lost is detected, the TRX bit becomes 0 (receive mode) even when the bit after the
slave address is 1 (read). Therefore, after arbitration lost is detected, read the S00 register. When the
bit 0 in the S00 register is 1, write 4Fh (slave transmit mode) to the S10 register and execute slave
transmission.
Figure 25.20 Example of Slave Transmission
(A) Start of slave transmission
(In I
2
C-bus interrupt routine)
(1) Check the value of the S10 register. When the TRX bit is 1, the I
2
C interface is in slave transmit
mode.
(2) Write transmit data to the S00 register.
(B) Data transmission
(In I
2
C-bus interrupt routine)
(1) Write transmit data to the S00 register.
Write dummy data to the S00 register even if an interrupt occurs at an ACK clock of the last transmit
data. After writing to the S00 register, the SCLMM pin is released.
SCLMM
SDAMM
IR bit in the
IICIC register
(A) Start of slave transmission
Stop condition
Set to 0 by interrupt request acceptance or by program
m
s
m
s
m
Slave address
(7 bits)
R
S
A
Data
(8 bits)
A
Data
(8 bits)
A
P
S: Start condition
P: Stop condition
A: ACK
A: NACK
R: Read
W: Write
m: Master outputs to SDA
s: Slave outputs to SDA
(B) Data transmission
Содержание M16C/60 Series
Страница 853: ...M16C 64A Group R01UH0136EJ0210...