19 UNIVERSAL SERIAL INTERFACE (USI) [S1C17564]
S1C17554/564 TECHNICAL MANUAL
Seiko Epson Corporation
19-17
Check whether the received address is matched to this I2C slave address or not. When they are matched,
send back an ACK to the I2C master by setting ISTGMOD[2:0] to 0x4 and write 1 to ISTG. ISBSY is set to
1 while an ACK is being sent and it reverts to 0 when the transmission has completed. An interrupt request
can be generated at this point. When an ACK has been sent, ISSTA[2:0] is set to 0x4.
If the received address is not for this I2C slave, abort data reception and return to Step (1) to wait the subse-
quent start condition.
(3) Data transmission
When the transfer direction bit received with the slave address in Step (2) is 1, start data transmission by the
following procedure:
1. Write an 8-bit transmit data to the transmit data buffer (TD[7:0]).
2. Set ISTGMOD[2:0] to 0x2 and ISTG to 1.
This trigger transfers the buffer data to the transmit shift register to start transmission. When clocks are in-
put from the US_SCKx pin, the data in the shift register is shifted in sequence with the clock and sent from
the US_SDOx pin.
Writing 1 to ISTG sets ISBSY to 1. When data in the transmit data buffer is sent to the transmit shift regis-
ter, ISBSY reverts to 0 and ISSTA[2:0] is set to 0x2 (transmit data buffer empty). An interrupt request can
be generated at this point. Write subsequent data to the transmit data buffer to start the following transmis-
sion using this interrupt.
However, check that the master device has sent back an ACK or NAK (by setting ISTGMOD[2:0] to 0x6
and ISTG to 1) before starting the following 8-bit data transmission.
ISBSY is set to 1 while an ACK/NAK is being detected and it reverts to 0 when the detection has complet-
ed. Receiving an ACK sets ISSTA[2:0] to 0x5; receiving a NAK sets it to 0x6. Check ISSTA[2:0] after con-
firming ISBSY or using an interrupt. When an ACK has been received, perform data transmission. When a
NAK has been received, perform the appropriate handling.
(4) When a stop condition is received
If the ISSTA[2:0] value read during data transmission is 0x1, the I2C master device has generated a stop
condition (see Figure 19.5.3.6). In this case, abort data transmission.
Data reception in I2C slave mode
The following describes the data receiving procedure in I2C slave mode.
START
END
no
Receive data
Send ACK
Start condition?
Stop condition?
Receive slave address and transfer
direction bit
Address matched?
yes
Send ACK
no
yes
5.3.13 I
Figure 19.
2C Slave Data Receiving Flow Chart