18 UNIVERSAL SERIAL INTERFACE (USI)
18-6
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
Master mode
USI_CK (SCPOL = 1, SCPHA = 1)
USI_CK (SCPOL = 1, SCPHA = 0)
USI_CK (SCPOL = 0, SCPHA = 1)
USI_CK (SCPOL = 0, SCPHA = 0)
USI_DI/USI_DO
Fetching received data
into shift register
D7 (MSB)
D0 (LSB)
Slave mode
USI_CK (SCPOL = 1, SCPHA = 1)
USI_CK (SCPOL = 1, SCPHA = 0)
USI_CK (SCPOL = 0, SCPHA = 1)
USI_CK (SCPOL = 0, SCPHA = 0)
USI_DI
USI_DO
Fetching received data
into shift register
D7 (MSB)
D0 (LSB)
D7 (MSB)
D0
4.5.1 Clock and Data Transfer Timing (MSB first)
Figure 18.
Clock mode (master mode only)
In SPI master mode, either normal or fast clock mode can be selected using SFSTMOD/USI_SCFG register.
Setting SFSTMOD to 0 (default) places the USI into normal mode and the USI generates the transfer clock by
dividing the T8 output by 2. Setting SFSTMOD to 1 places the USI into fast mode and the USI uses PCLK1
supplied from the CMU directly as the transfer clock. The fast mode does not use the T8.
The SPI slave mode uses the T8 output clock for generating the sampling clock.
Data length (master mode only)
In SPI master mode, the data length can be selected using SCHLN/USI_SCFG register. Setting SCHLN to 0
(default) configures the data length to 8 bits.
Setting SCHLN to 1 configures the data length to 9 bits. In 9-bit mode, 8-bit data is prefixed with a command
bit (1 bit). The command bit is used for controlling the SPI LCD controller connected to the USI. The command
bit value to be transmitted can be specified using SCMD/USI_SCFG register. Setting SCMD to 1 configures the
command bit to high. Setting SCMD to 0 configures the command bit to low.
SCHLN = 0, SCMD =
*
SCHLN = 1, SCMD = 0
SCHLN = 1, SCMD = 1
Command bit
D7 (D0) D6 (D1) D5 (D2) D4 (D3) D3 (D4) D2 (D5) D1 (D6) D0 (D7)
D7 (D0) D6 (D1) D5 (D2) D4 (D3) D3 (D4) D2 (D5) D1 (D6) D0 (D7)
D7 (D0) D6 (D1) D5 (D2) D4 (D3) D3 (D4) D2 (D5) D1 (D6) D0 (D7)
4.5.2 9-bit Transfer Data Format in SPI Master Mode
Figure 18.
The data length in SPI slave mode is fixed at 8 bits.
Settings for I
18.4.6
2
C Mode
The I
2
C mode does not need to set data format and other conditions. The data length in I
2
C mode is fixed at 8 bits.