![](http://datasheet.mmic.net.cn/370000/UPD780076_datasheet_16740795/UPD780076_315.png)
CHAPTER 16 SERIAL INTERFACE SIO3
315
User
’
s Manual U14260EJ3V1UD
16.4.2 3-wire serial I/O mode
The 3-wire serial I/O mode can be used when connecting a peripheral IC incorporating a clocked serial interface,
a display controller, etc.
This mode executes communication via three lines: a serial clock line (SCK3), serial output line (SO3), and serial
input line (SI3).
(1) Registers to be used
Serial operation mode register 3 (CSIM3)
Port mode register 3 (PM3)
Port register 3 (P3)
The basic procedure of setting an operation in the 3-wire serial I/O mode is as follows.
<1> Set bits 2 to 0 (MODE3, SCL31, and SCL30) of the CSIM3 register (see
Figure 16-2
).
<2> Set bit 7 (CSIE3) of the CSIM3 register to 1.
→
Transmission/reception is enabled.
<3> Write data to the SIO3 register.
→
Data transmission/reception is started.
Read data from the SIO3 register.
→
Data reception is started.
Caution Take relationship with the other party of communication when setting the port mode register
and port register.
The relationship between the register settings and pins is shown below.
Table 16-2. Relationship Between Register Settings and Pins (3-Wire Serial I/O Mode)
CSIM3
PM34
P34
PM35
P35
PM36
P36
Operation Mode
Pin Function
CSIE3 MODE3 SCL31 SCL30
P34/
SI3/
TxD2
P35/
SO3/
RxD2 ASCK2
P36/
SCK3/
1
1
0
0
1
×
×
Note
×
Note
1
×
Slave reception
SI3
P35
SCK3
input
1
0
0
0
×
Note
×
Note
0
0
1
×
Slave transmission
P34
SO3
SCK3
input
1
0
0
0
1
×
0
0
1
×
Slave transmission/
reception
SI3
SO3
SCK3
input
1
1
Other
than above
1
×
×
Note
×
Note
0
0
Master reception
SI3
P35
SCK3
output
1
0
×
Note
×
Note
0
0
0
0
Master transmission
P34
SO3
SCK3
output
1
0
1
×
0
0
0
0
Master transmission/
reception
SI3
SO3
SCK3
output
Note
Can be set as port function.
Caution When using SIO3, stop the operation of UART2 (bit 7 (POWER2) of asynchronous serial interface
mode register 2 (ASIM2) = 0).
Remark
×
: don
’
t care, CSIM3: Serial operation mode register 3, PM
××
: Port mode register,
P
××
: Port output latch