19 UNIVERSAL SERIAL INTERFACE WITH LCD INTERFACE (USIL)
19-10
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
4.8.1 Setup Cycle Settings
Table 19.
LPST[1:0]
Number of setup cycles
0x3
4 cycles
0x2
3 cycles
0x1
2 cycles
0x0
1 cycle
(Default: 0x0)
Hold cycle
The hold cycle can be set to 1–4 cycles using LPHD[1:0]/USIL_LPAC register.
4.8.2 Hold Cycle Settings
Table 19.
LPHD[1:0]
Number of hold cycles
0x3
4 cycles
0x2
3 cycles
0x1
2 cycles
0x0
1 cycle
(Default: 0x0)
Wait cycle
The wait cycle can be set to 0–15 cycles using LPWT[3:0]/USIL_LPAC register.
4.8.3 Wait Cycle Settings
Table 19.
LPWT[3:0]
Number of wait cycles
0xf
15 cycles
0xe
14 cycles
:
:
0x2
2 cycles
0x1
1 cycle
0x0
0 cycles
(Default: 0x0)
Data Transfer Control
19.5
This section describes how to control data transfers. The following explanations assume that the configurations de-
scribed above and interrupt/DMA settings have already been finished.
Data Transfer in UART Mode
19.5.1
Data transmission
To start data transmission in UART 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, and the start bit is output from the USIL_DO pin. The data
in the shift register is then output in sequence. Following output of the eighth data bit, the parity bit (if parity is
enabled) and the stop bit are output.
The transmitter circuit includes two status flags: UTDIF/USIL_UIF register and UTBSY/USIL_UIF register.
The UTDIF flag indicates the transmit data buffer status. This flag is set to 1 indicating that the transmit data
buffer becomes empty when data written to the transmit data buffer is sent to the transmit shift register. UTDIF
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 writ-
ten 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 UTDIF has been set will
overwrite earlier transmit data inside the transmit data buffer. After UTDIF is set to 1, it can be reset to 0 by
writing 1.
The UTBSY flag indicates the USIL status in UART mode. This flag switches to 1 when transmit data is writ-
ten to the transmit buffer and reverts to 0 after both the shift register and transmit buffer become empty.