19 UNIVERSAL SERIAL INTERFACE WITH LCD INTERFACE (USIL)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
19-23
(1) Waiting for start condition
The procedure is the same as that of data transmission in I
2
C slave mode.
(2) Receiving slave address and transfer direction data bit
The procedure is the same as that of data transmission in I
2
C slave mode.
(3) Data reception
When the transfer direction bit received with the slave address in Step (2) is 0, start data reception by set-
ting ISTGMOD[2:0] to 0x3 and writing 1 to ISTG.
When clocks are input, the I
2
C controller loads the USIL_DO pin status to the shift register in sync with
each clock. 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 ISTG sets ISBSY to 1. When the received data is loaded to the receive data buffer, ISBSY
reverts to 0 and ISSTA[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 master device after an 8-bit data has been received.
To send back an ACK, set ISTGMOD[2:0] to 0x4 and write 1 to ISTG. To send back a NAK, set
ISTGMOD[2:0] to 0x5 and write 1 to ISTG.
ISBSY is set to 1 while an ACK/NAK 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 or NAK has been sent, ISSTA[2:0] is set
to 0x4.
Repeat an 8-bit data reception and ACK (NAK) transmission for the required number of times.
(4) When a stop condition is received
If the ISSTA[2:0] value read during data reception is 0x1, the I
2
C master device has generated a stop condi-
tion (see Figure 19.5.3.6). In this case, abort data reception.
Clock stretch function
While data is being sent/received, this I
2
C slave generates a clock stretch status by pulling down the SCL line to
low to make a wait request to the master device after an ACK is sent/received until the following data transfer is
started.
Data Transmission in LCD SPI Mode
19.5.4
The LCD SPI mode supports only data transmission.
To start data transmission in LCD SPI mode, write the transmit data to the transmit data buffer (TD[7:0]/USIL_TD
register) after setting the command bit status (LSCMD/USIL_LSCFG register).
The buffer data is sent to the transmit shift register. The module starts clock output from the USIL_CK pin. The
data in the shift register is shifted in sequence at the clock rising or falling edge (see Figure 19.4.7.1) and sent from
the USIL_DO pin.
The LCD SPI controller includes two status flags for transfer control: LSTDIF/USIL_LSIF register and LSBSY/
USIL_LSIF register.
The LSTDIF flag indicates the transmit data buffer status. LSTDIF is set to 1 indicating that the transmit data buf-
fer becomes empty when data written to the transmit data buffer is sent to the transmit shift register. LSTDIF is an
interrupt flag. An interrupt or DMA request can be generated when this flag is set to 1 (see Section 19.7). Write
subsequent data to the transmit data buffer to start the following transmission using this interrupt or DMA. The
transmit data buffer size is 1 byte, but a shift register is provided separately to allow data to be written while the
previous data is being sent. If an interrupt or DMA is not used for transmission, be sure to confirm that the transmit
data buffer is empty before writing transmit data. Writing data before LSTDIF has been set will overwrite earlier
transmit data inside the transmit data buffer.
The LSBSY flag indicates the USIL status in LCD SPI mode. This flag switches to 1 when transmit data is written
to the transmit buffer and reverts to 0 after data transfer for the data size set using LSDMOD[1:0]/USIL_LSDCFG
register has completed.