13 SeRial inTeRFaCe
13-12
Seiko epson Corporation
S1C63003/004/008/016 TeChniCal Manual
(Rev. 1.1)
8.4 Selecting P33 port function
Table 13.
Slave mode: SMOD="0"
Master mode: SMOD="1"
ESREADY
ENCS
P33 terminal
ESREADY
ENCS
P33 terminal
*
0
P33 (I/O)
*
0
P33 (I/O)
0
1
SS (I)
0
1
P33 (I/O)
1
1
SRDY (O)
1
1
Prohibited
SD[7:0]: Serial interface data register (FF5Ch, FF5Bh)
These registers are used for writing and reading serial data.
When writing
When "1" is written: High level
When "0" is written: Low level
Write data to be output in these registers. The register data is converted into serial data and output from the SOUT
(P31) terminal; data bits set at "1" are output as high (V
DD
) level and data bits set at "0" are output as low (V
SS
)
level.
When reading
When "1" is read: High level
When "0" is read: Low level
The serial data input from the SIN (P32) terminal can be read from these registers. The serial data input from the
SIN (P32) terminal is converted into parallel data, as a high (V
DD
) level bit into "1" and as a low (V
SS
) level bit
into "0," and is loaded to these registers. Perform data reading only while the serial interface is not running (i.e.,
the synchronous clock is neither being input or output). At initial reset, these registers are undefined.
Precautions
13.9
• Perform data writing/reading to the data registers SD[7:0] only while the serial interface is not running (i.e., the
synchronous clock is neither being input or output).
• As a trigger condition, it is required that data writing or reading on data registers SD[7:0] be performed prior to
writing "1" to SCTRG. (The internal circuit of the serial interface is initiated through data writing/reading on data
registers SD[7:0].) In addition, be sure to enable the serial interface with the ESIF register before setting the trig-
ger.
Supply trigger only once every time the serial interface is placed in the RUN state. Refrain from performing trigger
input multiple times, as leads to malfunctioning. Moreover, when the synchronous clock SCLK is external clock,
start to input the external clock after the trigger.
• Setting of the input/output permutation (MSB first/LSB first) with the SDP register should be done before setting
data to SD[7:0].
• Be aware that the maximum clock frequency for the serial interface is limited to 1 MHz when the programmable
timer is used as the clock source or the serial interface is used in slave mode.