Serial I/O Application Example - Renesas 4513 User Manual

4500 series 4-bit single-chip microcomputer
Table of Contents

Advertisement

(2) Transmit/receive operation of slave
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 bits of
register SI and the contents of register B are transferred to the high-order bits of register SI. At
this time, the S
Serial transfer is started with the SST instruction. However, in Figure 2.4.2 where an external
clock is selected, transfer is not started until the clock is input. When the SST instruction is
executed, the serial I/O transmit/receive completion flag (SIOF) is cleared to "0."
The microcomputer on the transmitting side is informed that the receiving side is ready to receive.
In the connection example in Figure 2.4.2, this notification is done by pulling the control signal "L"
level.
The transmit data is output from the S
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 are shifted to one bit position toward the LSB.
Also, the receive data is input from the S
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 transmit/receive of 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.
Make sure that the control signal pin level is "H" after the receive operation is completed.
Note: Repeat steps

2.4.4 Serial I/O application example

(1) Serial I/O
Outline: The 4513/4514 Group can communicate with peripheral ICs.
Specifications: Figure 2.4.2 Serial I/O connection example.
Figure 2.4.5 shows the master serial I/O setting example, and Figure 2.4.6 shows the slave serial
I/O setting example.
pin must be at the "H" level.
CK
through
to transmit or receive multiple data in succession.
4513/4514 Group User's Manual
pin synchronously with the falling edges of the shift
OUT
pin synchronously with the rising edges of the shift
IN
APPLICATION
2.4 Serial I/O
2-45

Advertisement

Table of Contents
loading

This manual is also suitable for:

4514

Table of Contents