18 UNIVERSAL SERIAL INTERFACE (USI)
18-2
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
USI Pins
18.2
Table 18.2.1 lists the USI input/output pins.
2.1 List of USI Pins
Table 18.
Pin name
USI mode
Signal name
I/O
Function
USI_DI
Software reset
–
I
Data input pin
UART
uart_rx
I
Data input pin
Inputs serial data sent from an external serial device.
SPI master
spi_di
I
SPI slave
spi_di
I
I
2
C master
i2c_sda
I/O Data input/output pin
Inputs/outputs serial data from/to the I
2
C bus. (
*
1)
I
2
C slave
i2c_sda
I/O
USI_DO
Software reset
–
I
Data input pin
UART
uart_tx
O
Data output pin
Outputs serial data sent to an external serial device.
SPI master
spi_do
O
SPI slave
spi_do
O
I
2
C master
–
–
Not used
I
2
C slave
–
–
USI_CK
Software reset
–
I
Data input pin
UART
–
–
Not used
SPI master
spi_ck
O
Clock output pin
Outputs the SPI clock.
SPI slave
spi_ck
I
Clock input pin
Inputs an external clock.
I
2
C master
i2c_sck
I/O SCL input/output pin
Inputs SCL line status from the I
2
C bus. Also outputs the I
2
C clock.
I
2
C slave
i2c_sck
I/O SCL input/output pin
Inputs SCL line status from the I
2
C bus. Also outputs a clock stretch
condition.
USI_CS
Software reset
–
I
Data input pin
UART
–
–
Not used
SPI master
–
–
SPI slave
#spi_ss
I
SPI slave select signal input pin
Low level input to this pin selects USI (in SPI slave mode) as an
SPI slave device.
I
2
C master
i2c_sda
I/O Data input/output pin
Inputs/outputs serial data from/to the I
2
C bus. (
*
1)
I
2
C slave
i2c_sda
I/O
*
1: When USI is configured to I
2
C master or slave mode, either the USI_DI pin or the USI_CS pin can be used as the
data input/output pin. Note, however, that both the USI_DI and USI_CS pins cannot be used as the data input/out-
put pin simultaneously.
*
2: After a software reset, all USI pins are set for input if USI has not been configured to any mode.
Note: Use a GPIO port to output the slave select signal when USI is configured to SPI master mode.
The USI input/output pins (USI_DI, USI_DO, USI_CK, USI_CS) are shared with I/O ports and are initially set as
general-purpose I/O port pins. The pin functions must be switched using the port function select bits to use the gen-
eral purpose I/O port pins as USI input/output pins.
For detailed information on pin function switching, see the “I/O Ports (GPIO)” chapter.
USI Clock Sources
18.3
Operating clock
The USI uses PCLK1 as the operating clock. Therefore, PCLK1 must be supplied from the CMU before start-
ing the USI including setting the control registers. For more information on the PCLK1 supply, refer to the “Clock
Management Unit (CMU).”
Transfer clock
When the USI is configured to a UART, SPI master (normal mode), or I
2
C master device, the source clock for
transfer is supplied by the 8-bit timer (T8 Ch.0). Program T8 Ch.0 according to the transfer rate and enable sup-
plying the source clock to the USI module. The USI module divides the source clock to generate the transfer
clock (or sampling clock). Be aware that the division ratio in the USI depends on the interface mode.
When the USI is configured to an SPI master (fast mode) device, PCLK1 is used as the source clock.