18 UNIVERSAL SERIAL INTERFACE (USI)
18-28
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
USI SPI Master/Slave Mode Configuration Register (USI_SCFG)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
USI SPI Master/
Slave Mode
Configuration
Register
(USI_SCFG)
0x300450
(8 bits)
D7–6 –
reserved
–
–
–
0 when being read.
D5
SCMD
Command bit (for 9-bit data)
1 High
0 Low
0
R/W
D4
SCHLN
Character length select
1 9 bits
0 8 bits
0
R/W
D3
SCPHA
Clock phase select
1 Phase 1
0 Phase 0
0
R/W
D2
SCPOL
Clock polarity select
1 Active L
0 Active H
0
R/W
D1
–
reserved
–
–
–
Do not set to 1.
D0
SFSTMOD Fast mode select
1 Fast
0 Normal
0
R/W
Note: This register is effective only in SPI master and slave modes. Configure USI to SPI master/slave
mode before this register can be used.
D[7:6]
Reserved
D5
SCMD: Command Bit (for 9-bit data in SPI master mode)
Sets the command bit value for 9-bit data (see SCHLN below).
1 (R/W): High
0 (R/W): Low (default)
D4
SCHLN: Character Length Select Bit (for SPI master mode)
Selects the serial transfer data length.
1 (R/W): 9 bits
0 (R/W): 8 bits (default)
In 9-bit mode, 8-bit data is prefixed with a command bit (1 bit). The command bit is used for control-
ling the SPI LCD controller connected to the USI. The command bit value to be transmitted can be
specified using SCMD.
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)
8.1 9-bit Transfer Data Format in SPI Master Mode
Figure 18.
This bit is effective only in SPI master mode. The data length in SPI slave mode is fixed at 8 bits.
D3
SCPHA: Clock Phase Select Bit
Selects the SPI clock phase.
1 (R/W): Phase 1
0 (R/W): Phase 0 (default)
Set the data transfer timing together with SCPOL. (See Figure 18.8.2.)
D2
SCPOL: Clock Polarity Select Bit
Selects the SPI clock polarity.
1 (R/W): Active low
0 (R/W): Active high (default)
Set the data transfer timing together with SCPHA. (See Figure 18.8.2.)
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)