19 UNIVERSAL SERIAL INTERFACE WITH LCD INTERFACE (USIL)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
19-5
USIL Module Settings
19.4
Make the following settings before starting data transfers using the USIL module.
(1) Program the clock source module to supply the clock required to the USIL module. (See Section 19.3.)
(2) Reset the USIL module.
(3) Set the USIL interface mode and a general condition (MSB first/LSB first) to be applied to all interface modes.
(4) Set the data format and operating conditions for the interface mode selected.
(5) Set interrupt and DMA transfer conditions if necessary. (See Section 19.7.)
(6) Select the port functions to be used for USIL according to the interface mode. (See Section 19.2 and the “I/O
Ports (GPIO)” chapter.)
USIL Module Software Reset
19.4.1
Writing 0x0 to USILMOD[2:0]/USIL_GCFG register resets the USIL module circuits. Be sure to perform software
reset before setting the interface mode.
Interface Mode
19.4.2
The USIL module provides seven serial interface functions shown in Section 19.1 and the interface mode can be
configured to one of them using the USILMOD[2:0]/USIL_GCFG register.
4.2.1 Interface Mode Selection
Table 19.
USILMOD[2:0]
Interface mode
0x7
LCD parallel
0x6
LCD SPI
0x5
I
2
C slave
0x4
I
2
C master
0x3
SPI slave
0x2
SPI master
0x1
UART
0x0
Software reset
(Default: 0x0)
Notes: • Be sure to perform software reset and set the interface mode before changing other USIL con-
figurations.
• The LCD parallel, UART, I
2
C master, and I
2
C slave must be set before configuring the I/O port
for USIL.
General Settings for All Interface Modes
19.4.3
MSB first/LSB first selection
Use LSBFST/USIL_GCFG register to select whether the data MSB or LSB is input/output first.
LSB first is selected when LSBFST is set to 0 (default). MSB first is selected when LSBFST is set to 1.
Settings for UART Mode
19.4.4
When the USIL is used in UART mode, configure the data length, stop bit, and parity bit. The start bit length is
fixed at 1 bit.
Data length
Use UCHLN/USIL_UCFG register to select the data length. Setting UCHLN to 0 (default) configures the data
length to 7 bits. Setting UCHLN to 1 configures it to 8 bits.
Stop bit
Use USTPB/USIL_UCFG register to select the stop bit length. Setting USTPB to 0 (default) configures the
stop bit length to 1 bit. Setting USTPB to 1 configures it to 2 bits.