154
CHAPTER 11 SERIAL INTERFACES SIO30 TO SIO32
User’s Manual U15104EJ2V0UD
Caution
Set the port mode register (PM
××
) as follows in the 3-wire serial I/O mode. Set the output
latch to 0.
Serial Type
Serial Interface
Serial Interface
Serial Interface SIO32
Operation Mode
SIO30
SIO31
S32SEL0 = 0
S32SEL0 = 1
Serial clock output
PM72 = 0
PM76 = 0
PM122 = 0
PM125 = 0
(master transmission or
(set P72/SCK30 pin
(set P76/SCK31 pin
(set P122/SCK32 pin
(set P125/SCK321
reception)
to output mode)
to output mode)
to output mode)
pin to output mode)
Serial clock input
PM72 = 1
PM76 = 1
PM122 = 1
PM125 = 1
(slave transmission or reception)
(set P72/SCK30 pin
(set P76/SCK31 pin
(set P122/SCK32 pin
(set P125/SCK321
to input mode)
to input mode)
to input mode)
pin to input mode)
In transmit or transmit/receive
PM71 = 0
PM75 = 0
PM121 = 0
PM124 = 0
mode
(set P71/SO30 pin to (set P75/SO31 pin to
(set P121/SO32 pin
(set P124/SO321 pin
output mode)
output mode)
to output mode)
to output mode)
In receive mode
PM70 = 1
PM74 = 1
PM120 = 1
PM123 = 1
(set P70/SI30 pin to
(set P74/SI31 pin to
(set P120/SI32 pin to
(set P123/SI321 pin
input mode)
input mode)
input mode)
to input mode)
(2) Communication operation
In the 3-wire serial I/O mode, data is transmitted or received in 8-bit units. Data is transmitted or received
in synchronization with the serial clock.
The shift operation of serial I/O shift register 3n (SIO3n) is performed at the falling edge of the serial clock
(SCK3n). The transmit data is retained in SO3n latch and is output from the SO3n pin. The receive data input
to the SI3n pin is latched to SIO3n at the falling edge of the serial clock.
When 8-bit data has been transferred, the operation of SIO3n is automatically stopped, and an interrupt request
flag (CSIIF3n) is set.
Figure 11-6. Timing in 3-Wire Serial I/O Mode
SCK3n
SI3n
SO3n
CSIIF3n
Transfer starts at falling edge of SCK3n
Transfer ends
1
2
3
4
5
6
7
8
DI7
DI6
DI5
DO7
DO6
DO5
DI4
DI3
DI2
DO4
DO3
DO2
DI1
DI0
DO1
DO0