
132
EPSON
S1C88409 TECHNICAL MANUAL
CHAPTER 5: PERIPHERAL CIRCUITS AND OPERATION (Serial Interface)
Setting of serial interface
(1) Transfer mode
The transfer mode is set with the SMD register
(2 bits) as shown in Table 5.14.2.1.
Table 5.14.2.1 Transfer mode
SMD1
1
0
SMD0
1
0
1
0
Mode
8-bit asynchronous
7-bit asynchronous
Clock synchronous slave
Clock synchronous master
It is set to the clock synchronous master mode
at initial reset.
In the clock synchronous mode, start/stop bit
and parity bit cannot be added.
The clock synchronous slave mode outputs the
SRDY signal showing transmit/receive ready
status from the SRDY terminal.
When using the IR interface, set the 7-bit
asynchronous mode or 8-bit asynchronous
mode.
The input/output terminals of the serial
interface can be assigned to P10–P13 or P14–
P17. Select either one using the SIOSEL register.
Table 5.14.2.2 Input/output terminals
Terminal
SIN
SOUT
SCLK
SRDY
SIOSEL="0"
P10
P11
P12
P13
SIOSEL="1"
P14
P15
P16
P17
(ESIF="1")
It is set to P10–P13 at initial reset.
When using the IR interface, select P14–P17.
The ports which are not used in the serial
interface can be used as the I/O port.
Input/output configuration of the four lines
differs depending on the transfer mode. Table
5.14.2.3 shows the terminal configuration of
each mode.
The clock synchronous slave mode uses all four
lines.
The clock synchronous master mode does not
use SRDY, so P13 (P17) can be used as the I/O
port.
The asynchronous mode does not use SCLK
and SRDY, so P12 and P13 (P16 and P17) can be
used as the I/O port.
The I/O control registers and data registers of
the I/O port which is used with the serial
interface can be used as a general-purpose
register.
Table 5.14.2.3 Terminal setting for each transfer mode
SIN
Data input
SOUT
Data output
SCLK
P12/P16
Clock input
Clock output
SRDY
P13/P17
Ready output
P13/P17
Mode
8-bit asynchronous
7-bit asynchronous
Clock synchronous slave
Clock synchronous master
(2) Data format of clock synchronous transfer
In the clock synchronous mode, data format is
stationary as follows:
Data length: 8 bits
Start bit:
none
Stop bit:
none
Parity bit:
none
SCLK
Data
D0 D1 D2 D3 D4 D5 D6 D7
LSB
MSB
Fig. 5.14.2.4 Clock synchronous
transfer data format
(3) Data format of asynchronous transfer
The data format of asynchronous transfer is as
follows:
Data length: 7 bits or 8 bits
(decided by transfer mode selection)
Start bit:
1 bit stationary
Stop bit:
1 bit or 2 bits
Parity bit:
even parity, odd parity or none
The stop bit can be set with the STPB register,
and the parity bit can be set with the EPR
register and the PMD register shown in Table
5.14.2.4.
Table 5.14.2.4 Setting of stop bit and parity bit
EPR
1
0
1
0
STPB
1
0
PMD
1
0
–
1
0
–
Stop bit
2 bits
1 bit
Parity bit
Odd
Even
None
Odd
Even
None
Setting
At initial reset, they are set in 1 stop bit and no
parity.