19 UNIVERSAL SERIAL INTERFACE WITH LCD INTERFACE (USIL)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
19-11
Sampling clock
TD[7:0]
Shift register
USIL_DO pin
UTDIF
UTBSY
Interrupt
start
stop
stop
A
D7
A
D6
A
D5
A
D4
A
D3
A
D2
A
D1
A
D0
parity
parity
B
D0
Write
Write
Transmit buffer empty interrupt
Reset by writing 1
Reset by writing 1
Transmit buffer empty interrupt
(MSB first)
Data A
Data B
start B
D7
B
D6
5.1.1 Data Transmission Timing Chart (UART mode)
Figure 19.
Data reception
When the external serial device sends a start bit, the receiver circuit detects its low level and starts sampling the
following data bits. Once the 8-bit data has been received into the shift register, the received data is loaded into
the receive data buffer (RD[7:0]/USIL_RD register). If parity checking is enabled, the receiver circuit checks
the received data at the same time by checking the parity bit received immediately after the eighth data bit.
The receiver circuit includes two status flags: URDIF/USIL_UIF register and URBSY/USIL_UIF register.
The URDIF flag indicates the receive data buffer status. This flag is set to 1 indicating that the received data can
be read out when data received in the shift register is loaded to the receive data buffer. URDIF is an interrupt
flag. An interrupt or DMA request can be generated when this flag is set to 1 (see Section 19.7). Read the
received data from the receive data buffer using this interrupt or DMA. The receive data buffer size is 1 byte,
therefore the received data must be read before the subsequent data reception has completed. Furthermore,
URDIF must be reset by writing 1. If the next reception is completed when URDIF is 1 and the receive data
buffer (USIL_RD register) is not read, an overrun error occurs (at the time stop bit has been received).
The URBSY flag indicates the shift register status. This flag is set to 1 while data is being received in the shift
register and reverts to 0 once the received data is loaded to the receive data buffer. Read this flag to check
whether the receiver circuit is operating or at standby.
Sampling clock
USIL_DI pin
Shift register
RD[7:0]
URBSY
URDIF
Interrupt
start
stop
stop
A
D7
parity
parity
(MSB first)
Data A
Data B
start B
D7
stop
parity
A
D0
C
D0
B
D0
start C
D7
Receive buffer full interrupt
Receive buffer full interrupt
Overrun error interrupt
(when Data B has not been read)
Read
Reset by writing 1
5.1.2 Data Receiving Timing Chart (UART mode)
Figure 19.
Data Transfer in SPI Mode
19.5.2
Data transmission
To start data transmission in SPI mode, write the transmit data to the transmit data buffer (TD[7:0]/USIL_TD
register).
The buffer data is sent to the transmit shift register. In SPI master mode, the module starts clock output from the
USIL_CK pin. In SPI slave mode, the module awaits clock input 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.5.1) and sent from the USIL_
DO pin.
The SPI controller includes two status flags for transfer control: STDIF/USIL_SIF register and SSIF/USIL_SIF
register.