BAT32G1x9 user manual | Chapter 20 Serial interface IICA
775 / 1149
Rev.1.02
conform to the specifications of the products in the
communication.
2.n=0,1
(2) Master operation of multi-master system
Figure 20-27
operation of a multi-master system (1/3).
START
configure PER0 register
configure port
IICWLn
,
IICWHn
XXH
SVAn
XXH
IICFn
XH
configure STCENn and
IICRSVn
Configure IICCTLn1
IICCTLn0
0XX111XXB
ACKEn=WTIMn=SPIEn=1
IICCTLn0
1XX111XXB
IICEn=1
configure port
confirming bus
state.
Note
does INTIICAn interrupt
occur?
Yes
SPDn=1
?
Yes
No
confirming bus state.
bus in released state in a period of
time
STCENn=1
?
Yes
SPTn=1
No
does INTIICAn interrupt
occur?
Yes
SPDn=1
?
Yes
slave operation
No
wait for detection of
stop condition
No
slave operation
No
prepare starting
communication.
(generate stop
condition)
•
wait for other masters to appoint slave device.
•
Wait for communication start request (determined
by user program)
start master operation
Yes
(with communication start
request)
SPIEn=1
IICRSVn=0
?
SPIEn=0
does INTIICAn interrupt
occur?
Yes
No
(No communication start request)
Yes
A
B
No
slave operation
No
Waiting for a communication request.
1
release serial interface IICA from reset state,
start providing clock.
configure pins and multiplexed ports to be used.
First port configured to be input mode and output latch
set to
"0“
select transmission clock
configure local address
configure start condition
allows I2C bus outupt after configure Port from input mode
to output mode.
in
it
ia
l
c
o
n
fi
g
u
ra
ti
o
n
w
a
it
f
o
r
c
o
m
m
u
n
ic
a
ti
o
n
Note: You must confirm that the bus is in a free state
(
CLDn
bit
= 1,
DADn
bit
= 1) for a certain period of time (for example,
frame
1). When
the SDAAn
pin is fixed low, it must be determined whether to release the
I2
C-bus (SCLAn
pin and
SDAAn
)
according to the specifications of the product in the communication
Pin is high).
Note: n=0,1