243
CHAPTER 14 SERIAL INTERFACE (SIO3)
Preliminary User’s Manual U16035EJ1V0UM
14.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 clocked serial interface, a
display controller, etc.
This mode executes data transfers via three lines: a serial clock line (SCK3n), serial output line (SO3n), and serial
input line (SI3n).
(1) Register settings
3-wire serial I/O mode is set by the serial operation mode register 3n (CSIM3n).
CSIM3n is set by a 1-bit or 8-bit memory manipulation instruction.
RESET input sets CSIM3n to 00H .
Caution
In 3-wire serial I/O mode, set the port mode register (PMXX) as follows. Set the output latch of the port
set to output mode (PMXX = 0) to 0.
<When SIO30 is used>
During serial clock output
PM22 = 0: Sets P22 (SCK30) to output mode
(master transmission or master reception)
P22 = 0: Sets output latch of P22 to 0
During serial clock input
PM22 = 1: Sets P22 (SCK30) to input mode
(slave transmission or slave reception)
Transmit/receive mode
PM21 = 0: Sets P21 (SO30) to output mode
P21 = 0: Sets output latch of P21 to 0
Receive mode
PM20 = 1: Sets P20 (SI30) to input mode
<When SIO31 is used>
During serial clock output
PM36 = 0: Sets P36 (SCK31) to output mode
(master transmission or master reception)
P36 = 0: Sets output latch of P36 to 0
During serial clock input
PM36 = 1: Sets P36 (SCK31) to input mode
(slave transmission or slave reception)
Transmit/receive mode
PM35 = 0: Sets P35 (SO31) to output mode
P35 = 0: Sets output latch of P35 to 0
Receive mode
PM34 = 1: Sets P34 (SI31) to input mode