19 UNIVERSAL SERIAL INTERFACE WITH LCD INTERFACE (USIL)
19-18
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
0x4
0x5
0x3
0x1
D7
D6
D5
D4
D3
D2
D1
D0
ACK
USIL_CK pin (output)
USIL_CK pin (input)
USIL_DI pin (output)
USIL_DI pin (input)
IMTGMOD[2:0]
IMTG (write)
IMBSY
IMSTA[2:0]
RD[7:0]
IMIF
Stop interrupt
End of reception
interrupt
Transfer
NAK interrupt
Transfer
ACK interrupt
NAK
Received data (n - 1)
Received data n
*
*
*
*
0x3
0x4
0x4
0x1
(2) Data reception
→
Stop condition
*
When IMIF is cleared via software, IMSTA[2:0] is also cleared to 0x0.
5.3.9 I
Figure 19.
2
C Master Data Receiving Timing Chart
Note: The timing chart above shows a basic transfer operation that does not include an actual I
2
C trans-
fer procedure. See “Receiving control byte in I
2
C slave mode” in “19.9 Precautions.”
(1) Generating start condition
The procedure is the same as that of data transmission in I
2
C master mode.
(2) Sending slave address and transfer direction bit
The procedure is the same as that of data transmission in I
2
C master mode. However, send the slave address
with the transfer direction bit set to 1. Then check that the slave device sends back an ACK.
(3) Data reception
To start data reception, set IMTGMOD[2:0] to 0x3 and write 1 to IMTG.
This trigger starts outputting 8 clocks from the USIL_CK pin. The USIL_DO pin status is sampled in sync
with the clock and loaded to the shift register. The received data is loaded to the receive data buffer (RD[7:0]/
USIL_RD register) once the 8-bit data has been received in the shift register.
Writing 1 to IMTG sets IMBSY to 1. When the received data is loaded to the receive data buffer, IMBSY
reverts to 0 and IMSTA[2:0] is set to 0x3 (end of receive data). An interrupt request can be generated at this
point. Read the received data from the receive data buffer using this interrupt.
It is necessary to send back an ACK or NAK to the slave device after an 8-bit data has been received.
To send back an ACK, set IMTGMOD[2:0] to 0x4 and write 1 to IMTG. To send back a NAK, set
IMTGMOD[2:0] to 0x5 and write 1 to IMTG.
IMBSY is set to 1 while an ACK/NAK is being sent and it reverts to 0 when the transmission has complet-
ed. An interrupt request can be generated at this point. When an ACK or NAK has been sent, IMSTA[2:0] is
set to 0x4.
Repeat an 8-bit data reception and ACK (NAK) transmission for the required number of times.
(4) Generating stop condition
The procedure is the same as that of data transmission in I
2
C master mode.
(5) Generating repeated start condition
The procedure is the same as that of data transmission in I
2
C master mode.