APPLICATION
2.4 Serial I/O
2-44
4513/4514 Group User’s Manual
The full duplex communication of master and slave is described using the connection example shown in
Figure 2.4.2.
(1) Transmit/receive operation of master
➀ The transmit data is written into the serial I/O register SI with the TSIAB instruction. When the
TSIAB instruction is executed, the contents of register A are transferred to the low-order 4 bits of
register SI and the contents of register B are transferred to the high-order 4 bits of register SI.
➁ Whether the microcomputer on the receiving side is ready to receive or not is checked. In the
connection example in Figure 2.4.2, check that the input level of control signal is “L” level.
➂ Serial transfer is started with the SST instruction.
When the SST instruction is executed, the serial I/O transmit/receive completion flag (SIOF) is
cleared to “0.”
➃ The transmit data is output from the SOUT pin synchronously with the falling edges of the shift
clock.
➄ The transmit data is output bit by bit beginning with the LSB bit of register SI. Each time one bit
is output, the contents of register SI is shifted one bit position toward the LSB.
➅ Also, the receive data is input from the SIN pin synchronously with the rising edges of the shift
clock.
➆ The receive data is input bit by bit to the MSB bit of register SI.
➇ A serial I/O interrupt request occurs when the transfer of transmit data and receive data is
completed, and the SIOF flag is set to “1.”
➈ The receive data is taken in within the serial I/O interrupt service routine; or the data is taken in
after examining the completion of the transmit/receive operation with the SNZSI instruction without
using an interrupt.
Also, the SIOF flag is cleared to “0” when an interrupt occurs or the SNZSI instruction is executed.
Notes 1: Repeat steps ➀ through ➈ to transmit or receive multiple data in succession.
2: For the program on the master side, make sure that transmission is not started before the
control signal is released back “H” after a transmit operation is started first.