13 SeRial inTeRFaCe
13-10
Seiko epson Corporation
S1C63003/004/008/016 TeChniCal Manual
(Rev. 1.1)
eSiF: Serial interface enable register (P3 port function selection) (FF58h•D0)
Sets P30–P33 to the input/output port for the serial interface.
When "1" is written: Serial interface
When "0" is written: I/O port
Reading: Valid
When "1" is written to the ESIF register, P30, P31, P32 and P33 function as SIN, SOUT, SCLK and SRDY or
SS, respectively. In slave mode, the P33 terminal functions as SRDY output or SS input terminal, while in master
mode, it functions as the I/O port terminal.
At initial reset, this register is set to "0."
SCTRG: Clock trigger/status (FF58h•D1)
This is a trigger to start input/output of synchronous clock (SCLK).
When writing
When "1" is written: Trigger
When "0" is written: No operation
When this trigger is supplied to the serial interface activating circuit, the synchronous clock (SCLK) input/output
is started. 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 trigger. Supply trigger only once every time the serial interface is placed in the RUN state. Refrain from per-
forming 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.
When reading
When "1" is read: RUN (during input/output the synchronous clock)
When "0" is read: STOP (the synchronous clock stops)
When this bit is read, it indicates the status of serial interface clock. After "1" is written to SCTRG, this value is
latched till serial interface clock stops (8 clock counts). Therefore, if "1" is read, it indicates that the synchronous
clock is in input/output operation. When the synchronous clock input/output is completed, this latch is reset to
"0."
At initial reset, this bit is set to "0."
eSOuT: SOuT enable register (FF58h•D2)
Enables serial data output from the P31 port.
When "1" is written: Enabled (SOUT)
When "0" is written: Disabled (I/O port)
Reading: Valid
When serial data output is not used, the SOUT output can be disabled to use P31 as an I/O port. When performing
serial output, write "1" to ESOUT to set P31 as the SOUT output port. At initial reset, this register is set to "0."
SMOD: Operating mode select register (FF59h•D0)
Selects the serial interface operating mode from master mode and slave mode.
When "1" is written: Master mode
When "0" is written: Slave mode
Reading: Valid
In master mode, the serial interface uses the internal clock (selected in the clock manager) as the synchronous
clock for serial transfer. The synchronous clock is also output from the SCLK (P30) terminal to control the ex-
ternal serial interface (slave device). In slave mode, the serial interface inputs the synchronous clock that is sent
by the external serial interface (master device) from the SCLK terminal to perform serial transfer. Master mode
is selected by writing "1" to SMOD, and slave mode is selected by writing "0."
At initial reset, this register is set to "0."