Epson S1C31D50 Technical Manual page 236

Cmos 32-bit single chip
Hide thumbs Also See for S1C31D50:
Table of Contents

Advertisement

2
16 I
C (I2C)
Receiving subsequent data
When the received data is read out from the I2C_nRXD register after the I2C_nINTF.RBFIF bit has been set
to 1, the I2C Ch.n clears the I2C_nINTF.RBFIF bit to 0, releases SCL, and receives subsequent data sent
from the external master. After eight-bit data has been received, the I2C Ch.n sends an ACK and pulls down
SCL to low. The received data in the shift register is transferred to the receive data buffer and the I2C_
nINTF.RBFIF and I2C_nINTF.BYTEENDIF bits are both set to 1.
To return a NACK after eight-bit data is received, such as when terminating data reception, write 1 to the
I2C_nCTL.TXNACK bit before the data reception is completed. The I2C_nCTL.TXNACK bit is automati-
cally cleared to 0 after a NACK has been sent.
STOP/repeated START condition detection
It is the same as the data transmission in slave mode.
I
2
C bus
S
Saddr/W
BSY = 1
Software bit operations
Operations by the external master
S: START condition, Sr: Repeated START condition, P: STOP condition,
A: ACK, A: NACK, Saddr/W: Slave address + W(0), Data n: 8-bit data
Figure 16.4.6.1 Example of Data Receiving Operations in Slave Mode
16-14
Clock stretching by I2C
STARTIF = 1
RXD[7:0]
A
Data 1
A
TR = 0
RBFIF = 1
STARTIF = 1
BYTEENDIF = 1
Hardware bit operations
Operations by I2C (slave mode)
Data reception
One-byte reception?
YES
Write 1 to the I2C_nCTL.TXNACK bit
Wait for an interrupt request
(I2C_nINTF.STARTIF = 1)
Write 1 to the I2C_nINTF.STARTIF bit
Wait for an interrupt request
(I2C_nINTF.RBFIF = 1)
Last data received next?
YES
Write 1 to the I2C_nCTL.TXNACK bit
Read receive data from the I2C_nRXD register
Last data received?
YES
End
Figure 16.4.6.2 Slave Mode Data Reception Flowchart
Seiko Epson Corporation
Data 1
RXD[7:0]
Data 2
A
Data N
RBFIF = 1
RBFIF = 1
BYTEENDIF = 1
BYTEENDIF = 1
TXNACK = 1
RXD[7:0]
A
Data N
RBFIF = 1
RBFIF = 1
BYTEENDIF = 1
BYTEENDIF = 1
NO
NO
NO
S1C31D50/D51 TECHNICAL MANUAL
Data (N -1) RXD[7:0]
Data N
A
P
BSY = 0
STOPIF = 1
Sr
Data (N -1) RXD[7:0]
Data N
A
P
BSY = 0
TXNACK = 0
STOPIF = 1
Sr
TXNACK = 0
(Rev. 2.00)

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c31d51

Table of Contents