21 i
2
C SlaVe (i2CS)
S1C17624/604/622/602/621 TeChniCal Manual
Seiko epson Corporation
21-7
SDA1 (input)
SCL1 (input)
Stop condition
5.4 Stop Condition
Figure 21.
If a stop condition is detected while the I2CS module is selected as the slave device (SELECTED = 1), the
I2CS module sets DA_STOP/I2CS_STAT register to 1. At the same time, it sets the SDA1 and SCL1 pins into
high-impedance and initializes the I
2
C communication process to enter standby state that is ready to detect the
next start condition. Also SELECTED and BUSY are reset to 0.
An interrupt can be generated when DA_STOP is set to 1, so a communication terminating process should be
performed in the interrupt handler routine. DA_STOP is cleared by writing 1.
Disabling data transfer
After data transfer has finished, write 0 to the COM_MODE/I2CS_CTL register to disable data transfer.
Always make sure that BUSY and SELECTED are 0 before disabling data transfer.
To deactivate the I2CS module, set I2CSEN/I2CS_CTL register to 0.
Timing charts
PCLK
SCL1 (input)
SCL1 (output)
SDA1 (input)
SDA1 (output)
R/W
BUSY
SELECTED
TXEMP
TXUDF
DA_NAK
DA_STOP
Transmit data shift register
SDATA[7:0]
Interrupt
A6
H/L
valid
D[7:0]
A5
A4
A3
A2
A1
A0
D7
D6
ACK
Start condition
Slave address reception
Data transmission
Clock stretch
Transmit interrupt
Transmit interrupt
Transmit data is set.
shift
R/W = 1
PCLK x 6
5.5 I2CS Timing Chart 1 (start condition
→
data transmission)
Figure 21.
D5
D4
D3
D2
D1
D0
D0'
D6
D7
D0'
valid
shift
shift
shift
shift
shift
shift
shift
shift
ACK
PCLK
SCL1 (input)
SCL1 (output)
SDA1 (input)
SDA1 (output)
R/W
BUSY
SELECTED
TXEMP
TXUDF
DA_NAK
DA_STOP
Transmit data shift register
SDATA[7:0]
Interrupt
Data transmission
Data transmission
Clock stretch
Bus status interrupt
Transmit data is set.
PCLK x 6
NAK
D[7:0]
Transmit interrupt
Stop condition
5.6 I2CS Timing Chart 2 (data transmission
→
stop condition)
Figure 21.