12 I
2
C (I2C)
12-14
Seiko epson Corporation
S1C17F13 TeChniCal Manual
(Rev. 1.0)
Slave Operations in 10-bit Address Mode
12.4.7
The I2C Ch.
n
functions as a slave device in 10-bit address mode when the I2C
n
CTL.MST bit = 0 and the I2C
n
MOD.
OADR10 bit = 1.
The following shows the address receiving operations in 10-bit address mode. Figure 12.4.7.1 shows an operation
example. See Figure 12.4.4.1 for the 10-bit address configuration.
10-bit address receiving operations
After a START condition is issued, the master sends the first address that includes the two high-order slave ad-
dress bits and the R/W bit (= 0). If the received two high-order slave address bits are matched with the I2C
n
O-
ADR.OADR[9:8] bits, the I2C Ch.
n
returns an ACK. At this time, other slaves may returns an ACK as the two
high-order bits may be matched.
Then the master sends the eight low-order slave address bits as the second address. If this address is matched
with the I2C
n
OADR.OADR[7:0] bits, the I2C Ch.
n
returns an ACK and starts data receiving operations.
If the master issues a request to the slave to send data (data reception in the master), the master generates a re-
peated START condition and sends the first address with the R/W bit set to 1. This reception switches the I2C
Ch.
n
to data sending mode.
A
1stAddr/W
A
2ndAddr
A
1stAddr/W
A
2ndAddr
At start of data transmission
At start of data reception
S
STARTIF = 1
STARTIF = 1
A
Data 1
A
Data 2
I
2
C bus
Clock stretching by I2C
I
2
C bus
Clock stretching by I2C
Software bit operations
Operations by I2C (master mode)
S: START condition, Sr: Repeated START condition, P: STOP condition,
A: ACK, A: NACK, 1stAddr/W: 1st a W(0), 1stAddr/R: 1st a R(1),
2ndAddr: 2nd address, Data
n
: 8-bit data
Hardware bit operations
Operations by the external slave
RXD[7:0]
→
Data 1
RBFIF = 1
BYTEENDIF = 1
S
A
TR = 1
STARTIF = 1
TBEIF = 1
TBEIF = 1
TBEIF = 1
BYTEENDIF = 1
A
Data 1
Data 2
1stAddr/R
Sr
Data 1
→
TXD[7:0]
Data 2
→
TXD[7:0]
TR = 0
STARTIF = 1
BSY = 1
BSY = 1
TR = 0
STARTIF = 1
4.7.1 Example of Data Transfer Starting Operations in 10-bit Address Mode (Slave Mode)
Figure 12.
Automatic Bus Clearing Operation
12.4.8
The I2C Ch.
n
set into master mode checks the SDA state immediately before generating a START condition. If SDA is
set to a low level at this time, the I2C Ch.
n
automatically executes bus clearing operations that output up to ten clocks
from the SCL
n
pin with SDA left free state.
When SDA goes high from low within nine clocks, the I2C Ch.
n
issues a START condition and starts normal opera-
tions. If SDA does not change from low when the I2C Ch.
n
outputs the ninth clock, it is regarded as an automatic bus
clearing failure. In this case, the I2C Ch.
n
clears the I2C
n
CTL.TXSTART bit to 0 and sets both the I2C
n
INTF.ERRIF
and I2C
n
INTF.STARTIF bits to 1.