92
EPSON
S1C63358 TECHNICAL MANUAL
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (Serial Interface)
4.12 Serial Interface (SIN, SOUT, SCLK, SRDY)
4.12.1 Configuration of serial interface
The S1C63358 has a synchronous clock type 8 bits serial interface built-in.
The configuration of the serial interface is shown in Figure 4.12.1.1.
The CPU, via the 8-bit shift register, 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 selecting by software any one of three
types of master mode (internal clock mode: when the S1C63358 is to be the master for serial input/
output) and a type of slave mode (external clock mode: when the S1C63358 is to be the slave for serial
input/output).
Also, when the serial interface is used at slave mode, SRDY signal which indicates whether or not the
serial interface is available to transmit or receive can be output to the SRDY terminal.
SD0–SD7
SIN
(P10)
SCLK
or
SCLK
(P12)
SCS0
SCS1
Output
latch
Serial I/F interrupt
control circuit
Interrupt
request
SOUT
(P11)
SRDY
or
SRDY
(P13)
SCTRG
Serial I/F
activating
circuit
f
OSC1
Serial clock
counter
Serial clock
selector
Serial clock
generator
Shift register (8 bits)
Programmable
timer 1 underflow
signal
SCPS
ESOUT
Fig. 4.12.1.1 Configuration of serial interface
The input/output ports of the serial interface are shared with the I/O ports P10–P13, and function of
these ports can be selected through the software.
P10–P13 terminals and serial input/output correspondence are as follows:
Master mode
Slave mode
P10 = SIN (I)
P10 = SIN (I)
P11 = SOUT (O)
P11 = SOUT (O)
P12 = SCLK (O)
P12 = SCLK (I)
P13 = I/O port (I/O)
P13 = SRDY (O)
Note: At initial reset, P10–P13 are set to I/O ports.
When using the serial interface, switch the function (ESIF = "1") in the initial routine.
The SOUT (data output) signal passes through a tri-state buffer. To output serial data, write "1" to the
ESOUT register to set the buffer in data output status. When the ESOUT register is set to "0", the SOUT
signal is disabled and the SOUT terminal goes high-impedance status.