R01UH0092EJ0110 Rev.1.10
Page 574 of 807
Jul 31, 2012
M16C/64C Group
25. Multi-master I
2
C-bus Interface
25.3.10.2 Master Transmission
Master transmission is described in this section. The initial settings described in 25.3.10.1 “Initial
Settings” are assumed to be completed. Figure 21.17 shows master transmission operation.
The following programs (A) to (C) are executed at (A) to (C) in Figure 25.17, respectively.
Figure 25.17 Example of Master Transmission
(A) Slave address transmission
(1) The BB bit in the S10 register must be 0 (bus free).
(2) Write E0h to the S10 register (start condition standby).
(3) Write a slave address to the upper 7 bits and set the least significant bit (LSB) to 0 (start
condition generated, then slave address transmitted).
(B) Data transmission
(in I
2
C-bus interrupt routine)
(1) Write transmit data to the S00 register (data transmission).
(C) Completion of Master transmission
(in I
2
C-bus interrupt routine)
(1) Write C0h to the S10 register (stop condition standby state).
(2) Write dummy data to the S00 register (stop condition generated).
When transmission is completed or ACK is not returned from a slave device (NACK returned), master
transmission should be completed as shown in the example above.
SCLMM
SDAMM
IR bit in the IICIC
register
(A) Slave address transmission
(B) Data transmission
(C) Completion of master
transmission
Stop condition
Set to 0 by interrupt request acceptance or by program
m
s
m
s
s
m
m
Slave address
(7 bits)
W
S
A
Data
(8 bits)
A
Data
(8 bits)
A/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
Содержание M16C Series
Страница 846: ...M16C 64C Group R01UH0092EJ0110...