BAT32G1x9 user manual | Chapter 20 Serial interface IICA
780 / 1149
Rev.1.02
An example of the steps for a slave to process via an INTIICAn interrupt is shown below (assuming no
extension code is used here). Confirm the status by interrupting THROUGH INTIICAn and perform the following
processing.
①
If a stop condition is generated, the communication ends.
②
If a start condition is generated, the address is confirmed. If the addresses are different, the communication
ends. If the addresses are the same, set to communication mode and dismiss the wait, then return from
interrupt (clear the ready flag).
③
When sending and receiving data, the I2C bus remains waiting and returns from the interrupt as soon as
the ready flag is set.
Note that (1) ~ (3) above corresponds to
(1) ~ (3) of Figure 20-29
Slave run step (2). (2)".
Figure 20-29
Slave run step (2).
generate INTIICAn
SPDn=1
?
STDn=1
?
set ready flag to '1'
No
No
COIn=1
?
Yes
communiction direction flag
TRCn
set communication mode flag bit,
clear ready flag
clear communication direction flag,
ready flag and communication
mode flag
No
Yes
Yes
interrupt handling completes
Note: n=0,1