13 SeRial inTeRFaCe
S1C63003/004/008/016 TeChniCal Manual
Seiko epson Corporation
13-1
(Rev. 1.1)
Serial Interface
13
[S1C63004/008/016]
Note: The S1C63003 has no serial interface included.
Configuration of Serial interface
13.1
The S1C63004/008/016 has a built-in 8-bit clock synchronous type serial interface. The CPU, via the 8-bit shift reg-
ister, can read the serial input data from the SIN terminal. Moreover, via the same 8-bit shift register, it can convert
parallel data to serial data and output it to the SOUT terminal. The synchronous clock for serial data input/output may
be set by software any one of seven types of master mode (internal clock mode: when the S1C63004/008/016 is to
be the master for serial input/output) and one type of slave mode (external clock mode: when the S1C63004/008/016
is to be the slave for serial input/output).
The configuration of the serial interface is shown in Figure 13.1.1.
Clock
control
Transfer
mode control
Clock
manager
Interrupt control
SCLK
(P30)
SS
or
SRDY
(P33)
SIN
(P32)
SOUT
(P31)
8-bit shift register
SD[7:0]
Output
latch
Interrupt request
Serial interface
Data I/O permutation
SDP
SOUT enable
ESOUT
SMOD
Clock format selection
SCPS[1:0]
SIF enable (P3x)
ESIF
SRDY_SS enable (P33)
SRDY_SS function selection
Mode selection
ENCS
ESREADY
SIF clock trigger
SCTRG
SIF clock selection
SIFCKS[2:0]
f
OSC1
f
OSC3
Programmable
timer 1
Data bus
1.1 Configuration of serial interface
Figure 13.
Serial interface Terminals
13.2
The following shows the terminals used in the serial interface and their functions:
SCLK (P30)
Inputs or outputs the serial clock. By writing "1" to the ESIF register to enable the serial interface, the P30
terminal is switched to the SCLK terminal. In master mode, the SCLK terminal is configured for output and it
outputs the synchronous clock generated in the IC during data transfer. In slave mode, the SCLK terminal inputs
the synchronous clock output by the external master device.
SIN (P32)
Inputs serial data. By writing "1" to the ESIF register to enable the serial interface, the P32 terminal is switched
to the SIN terminal.
SOUT (P31)
Outputs serial data. By default, the SOUT terminal is not enabled even if "1" is written to the ESIF register. When
using the SOUT output, write "1" to the ESOUT register.
If serial input only is required, the P31 terminal can be used as an I/O port terminal.
SRDY (P33)
In slave mode, this terminal outputs the SRDY signal to the master device to indicate that the serial interface is
ready to transfer. By default, the SRDY terminal is not enabled even if the serial interface is set to slave mode.
When using the SRDY output in slave mode, write "1" to the ENCS and ESREADY registers.
SS (P33)
Inputs the SS (Slave Select) signal when the S1C63004/008/016 is used as an SPI slave device. When using the
SS input, write "1" to ENCS and write "0" to ESREADY.