290
CHAPTER 17 SERIAL INTERFACE (SIO3)
17.4.2 3-wire serial I/O mode
The 3-wire serial I/O mode is useful for connection to a peripheral I/O incorporating a clock-synchronous serial
interface, a display controller, etc.
This mode executes data transfers via three lines: a serial clock line (SCK30), serial output line (SO30), and serial
input line (SI30).
(1) Register settings
3-wire serial I/O mode is set by the serial operation mode register 30 (CSIM30).
CSIM30 can be set by a 1-bit or 8-bit memory manipulation instructions.
RESET input sets CSIM30 to 00H .
Caution
In 3-wire serial I/O mode, set the port mode register (PMXX) as follows. Set the output latch to 0.
During serial clock output (master transmission or master reception)
Set P22 (SCK30) to output mode (PM22 = 0)
During serial clock input (slave transmission or slave reception)
Set P22 to input mode (PM22 = 1)
During transmit/transmit and receive mode
Set P21 (SO30) to output mode (PM21 = 0)
During receive mode
Set P20 (SI30) to input mode (PM20 = 1)
Address: FFB0H After reset: 00H R/W
Symbol
7
6
5
4
3
2
1
0
CSIM30
CSIE30
0
0
0
0
MODE0
SCL301
SCL300
CSIE30
Enable/disable specification for SIO30
Shift register operation
Serial counter
Port
0
Operation stop
Clear
Port function
Note 1
1
Operation enable
Count operation enable
Serial function + port function
Note 2
MODE0
Transfer operation modes and flags
Operation mode
Transfer start trigger
SO30 output
0
Transmit/transmit and receive mode
Write to SIO30
Normal output
1
Receive-only mode
Read from SIO30
Fixed at low level
SCL301
SCL300
Clock selection
0
0
External clock input to SCK30
0
1
f
X
/2
3
(1.05 MHz)
1
0
f
X
/2
4
(524 kHz)
1
1
f
X
/2
5
(262 kHz)
Notes 1.
When CSIE30 = 0 (SIO30 operation stop status), the pins SI30, SO30, and SCK30 can be used for
port functions.
2.
When CSIE30 = 1 (SIO30 operation enabled state), the SI30 pin can be used as a port pin if only the
send function is used, and the SO30 pin can be used as a port pin if only the receive-only mode is
used.