
23
789
1
tLOW
SCL0 pin
SCL0 pin is pulled
to low when
SBI0CR2<PIN> is "0"
Set SBI0CR2<PIN> to "1" or
write data to SBI0DBR
SBI0CR2<PIN>
INTSBI0 interrupt request
Figure 18-11 SBI0CR2<PIN> and SCL0 Pin
Writing data to SBI0DBR sets SBI0CR2<PIN> to "1". The time from SBI0CR2<PIN> being set to "1" until
the SBI0 pin is released takes tLOW.
Although SBI0CR2<PIN> can be set to "1" by the software, SBI0CR2<PIN> can not be cleared to "0" by the
software.
18.4.9
Setting of serial bus interface mode
SBI0CR2<SBIM> is used to set serial bus interface mode.
Setting SBI0CR2<SBIM> to "1" selects the serial bus interface mode. Setting it to "0" selects the port mode.
Set SBI0CR2<SBIM> to "1" in order to set serial bus interface mode. Before setting of serial bus interface
mode, confirm serial bus interface pins in a high level, and then, write "1" to SBI0CR2<SBIM>.
And switch a port mode after confirming that a bus is free and set SBI0CR2<SBIM> to "0".
Note:When SBI0CR2<SBIM> is "0", no data can be written to SBI0CR2 except SBI0CR2<SBIM>. Before
setting values to SBI0CR2, write "1" to SBI0CR2<SBIM> to activate the serial bus interface mode.
18.4.10
Software reset
The serial bus interface circuit has a software reset function that initializes the serial bus interface circuit. If
the serial bus interface circuit locks up, for example, due to noise, it can be initialized by using this function.
A software reset is generated by writing "10" and then "01" to SBI0CR2<SWRST>.
After a software reset is generated, the serial bus interface circuit is initialized and all the bits of SBI0CR2
register, except SBI0CR2<SBIM> and the SBI0CR1, I2C0AR<SA> and SBI0SR2 registers, are initialized.
18.4.11
Arbitration lost detection monitor
Since more than one master device can exist simultaneously on a bus, a bus arbitration procedure is imple-
mented in order to guarantee the contents of transferred data.
Data on the SDA line is used for bus arbitration of the I2C bus.
The following shows an example of a bus arbitration procedure when two master devices exist simultaneously
on a bus. Master 1 and Master 2 output the same data until point "a". After that, when Master 1 outputs "1" and
Master 2 outputs "0", since the SDA line of a bus is wired AND, the SDA line is pulled down to the low level
by Master 2. When the SCL line of a bus is pulled-up at point "b", the slave device reads data on the SDA line,
that is data in Master 2. Data transmitted from Master 1 becomes invalid. The state in Master 1 is called "arbitration
TMP89FH42
18. Serial Bus Interface (SBI)
18.4 Functions
Page 288
RA002