R01UH0092EJ0110 Rev.1.10
Page 575 of 807
Jul 31, 2012
M16C/64C Group
25. Multi-master I
2
C-bus Interface
25.3.10.3 Master Reception
Master reception is described in this section. The initial settings described in 25.3.10.1 “Initial
Settings” are assumed to be completed. Figure 25.18 shows the operation example of master
reception. The following programs (A) to (D) are executed at (A) to (D) in Figure 25.18, respectively.
Figure 25.18 Example of Master Reception
(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 a set the least significant bit (LSB) to 1. (Start
condition generated, then slave address transmitted)
(B) Data reception 1 (after slave address transmission)
(In I
2
C-bus interrupt routine)
(1) Write AFh to the S10 register (master receive mode).
(2) Set the ACKBIT bit in the S20 register to 0 (ACK presents) because the data is not the last one.
(3) Write dummy data to the S00 register
(C) Data reception 2 (data reception)
(In I
2
C-bus interrupt routine)
(1) Read the received data from the S00 register.
(2) Set the ACKBIT bit in the S20 register to 1 (no ACK) because the data is the last one.
(3) Write dummy data to the S00 register.
(D) Completion of master reception
(In I
2
C-bus interrupt routine)
(1) Read the received data from the S00 register.
(2) Write C0h to the S10 register (stop condition standby state).
(3) Write dummy data to the S00 register (stop condition generated).
SCLMM
SDAMM
IR bit in the IICIC
register
(A) Slave address transmission
(B) Data reception 1
(D) Completion of master reception
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
(C) Data reception 2
Содержание M16C Series
Страница 846: ...M16C 64C Group R01UH0092EJ0110...