
211
Chapter 14
Serial Interface SIO31
User’s Manual U16504EE1V1UD00
14.5.2 Three-wire serial I/O mode
The three-wire serial I/O mode is useful when connecting a peripheral I/O device that includes a
clock-synchronous serial interface, a display controller, etc.
This mode executes the data transfer via three lines: a serial clock line (SCK31), serial output line
(SO31), and serial input line (SI31).
(1)
Register settings
The 3-wire serial I/O mode is set via serial operation mode register (CSIM31).
CSIM31 can be set via 1-bit or 8-bit memory manipulation instructions.
The RESET input set the value to 00H.
Figure 14-5:
Format of Serial Operation Mode Register (CSIM31)
Notes: 1.
When CSIE31 = 0 (SIO31 operation stop status), the pins SI31, SO31 and SCK31 can be
used for port functions.
2.
When CSIE31 = 1 (SIO31 operation enabled status), the SI31 pin can be used as a port pin
if only the send function is used, and the SO31 pin can be used as a port pin if only the
receive-only mode is used.
Caution:
In the 3-wire serial I/O mode, set the port mode register (PM9) as required. Set the
output latch of the port to 0.
<7>
6
5
4
3
2
1
0
R/W
Address
After
Reset
00H
CSIM31 CSIE31
0
0
0
0
MODE31 SCL311 SCL310 R/W
FFAAH
CSIE31
Enable/disable specification for SIO31
Shift register operation
Serial counter
Port
0
Operation stop
Clear
Port function
Note 1
1
Operation enable
Count operation enable
Serial operation + port function
Note 2
MODE31
Transfer operation modes and flags
Operation mode
Transfer start trigger
SO31 Output
0
Transmit/transmit and receive mode
Write to SIO31
Normal output
1
Receive-only mode
Read from SIO31
Fixed a low level
SCL311
SCL310
Clock selection
0
0
External clock input to SCK31
0
1
TM50
1
0
f
X
/2
3
1
1
f
X
/2
7