270
CHAPTER 14 SERIAL INTERFACE SIO3
User’s Manual U15798EJ2V0UD
14.4.2 3-wire serial I/O mode
The 3-wire serial I/O mode can be used for connection to a peripheral IC incorporating a clocked serial interface,
a display controller, etc.
This mode executes data transfers via three lines: a serial clock line (SCK3), serial output line (SO3), and serial
input line (SI3).
(1) Register settings
3-wire serial I/O mode is set by serial operation mode register 3 (CSIM3).
CSIM3 is set by a 1-bit or 8-bit memory manipulation instruction.
RESET input sets the value of this register to 00H.
Caution In 3-wire serial I/O mode, set the port mode register (PMXX) as follows. Set the output latch
of a port set to output mode (PMXX = 0) to 0.
During serial clock output
PM22 = 0; Sets P22 (SCK3) 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 (SCK3) to input mode
(slave transmission or slave reception)
Transmit/receive mode
PM21 = 0; Sets P21 (SO3) to output mode
P21 = 0; Sets output latch of P21 to 0
PM20 = 1; Sets P20 (SI3) to input mode
Receive mode
PM20 = 1; Sets P20 (SI3) to input mode