Renesas 4513 Network Card User Manual


 
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.