Master Mode And Slave Mode Of Serial Interface - Epson S1C63666 Technical Manual

Cmos 4-bit single chip microcomputer
Table of Contents

Advertisement

4.12.2 Mask option
Terminal specification
Since the input/output terminals of the serial interface is shared with the I/O ports (P10–P13), the
mask option that selects the output specification for the I/O port is also applied to the serial interface.
The output specification of the terminals SOUT, SCLK (during the master mode) and SRDY (during
the slave mode) that are used as output in the input/output port of the serial interface is respectively
selected by the mask options of P11, P12 and P13. Either complementary output or P-channel open
drain output can be selected as the output specification. However, when P-channel open drain output
is selected, do not apply a voltage exceeding the power supply voltage to the terminal.
Furthermore, the pull-down resistor for the SIN terminal and the SCLK terminal (during slave mode)
that are used as input terminals can be selected by mask option. The pull-down register can be added
by the mask options of P10 and P12. When "without pull-down" is selected, take care that the floating
status does not occur.
Polarity of synchronous clock and ready signal
Polarity of the synchronous clock and the ready signal that is output in the slave mode can be selected
from either positive polarity (high active, SCLK & SRDY) or negative polarity (low active, SCLK &
_________
SRDY).
When operating the serial interface in the slave mode, the synchronous clock is input from a external
device. Be aware that the terminal specification is pull-down only and a pull-up resistor cannot be
built in if negative polarity is selected.
In the following explanation, it is assumed that positive polarity (SCLK, SRDY) has been selected.

4.12.3 Master mode and slave mode of serial interface

The serial interface of the S1C63666 has two types of operation mode: master mode and slave mode.
The master mode uses an internal clock as the synchronous clock for the built-in shift register, and
outputs this internal clock from the SCLK (P12) terminal to control the external (slave side) serial device.
In the slave mode, the synchronous clock output from the external (master side) serial device is input
from the SCLK (P12) terminal and it is used as the synchronous clock for the built-in shift register.
The master mode and slave mode are selected by writing data to the SCS1 and SCS0 registers.
When the master mode is selected, a synchronous clock may be selected from among 3 types as shown in
Table 4.12.3.1.
When the programmable timer is selected, the signal that is generated by dividing the underflow signal
of the programmable timer (timer 2) in 1/2 is used as the synchronous clock. In this case, the program-
mable timer must be controlled before operating the serial interface. Refer to Section 4.11, "Programmable
Timer" for the control of the programmable timer.
At initial reset, the slave mode (external clock mode) is selected.
Moreover, the synchronous clock, along with the input/output of the 8-bit serial data, is controlled as
follows:
• In the master mode, after output of 8 clocks from the SCLK (P12) terminal, clock output is automati-
cally suspended and the SCLK (P12) terminal is fixed at low level (or high level when negative
polarity is selected by mask option).
• In the slave mode, after input of 8 clocks to the SCLK (P12) terminal, subsequent clock inputs are
masked.
S1C63666 TECHNICAL MANUAL
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (Serial Interface)
Table 4.12.3.1 Synchronous clock selection
SCS1
SCS0
1
1
1
0
0
1
0
0
∗ The maximum clock is limited to 1 MHz.
Mode
Synchronous clock
OSC1
Master mode
OSC1 /2
Programmable timer ∗
External clock ∗
Slave mode
EPSON
_________
91

Advertisement

Table of Contents
loading

Table of Contents