English
Language : 

7220 Datasheet, PDF (73/303 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER
FUNCTIONAL DESCRIPTION
2.7 Serial I/O
The transmit side in Figure 2.7.7, P21 is set as the serial I/O data output pin and P20 is set as the serial
I/O synchronous clock output pin by the initialization program.
The receive side, P21 is set as the serial I/O data input pin and P20 is used for the serial I/O synchronous
clock (external clock) input pin by the initialization program.
Figure 2.7.8 shows the serial data transmit/receive processing sequence using the above structure.
Transmit Side
Receive Side
Serial I/O Mode Register
b7
b0
0 11
Serial I/O Mode Register
b7
b0
1 0 10
Internal synchronous clock selection bits
Synchronous clock selection bit
1: Internal clock
Serial I/O port selection bit
1: SCLK, SOUT
Fix this bit to “0.”
Transfer direction selection bit
Serial input pin selection bit
Nothig is assigned.
Synchronous clock
P20/SCLK
SCLK/P20
Internal synchronious clock selection bits
Synchronous clock selection bit
0: External clock
Serial I/O port selection bit
1: SCLK, SOUT
Fix this bit to “0.”
Transfer direction selection bit
Serial input pin selection bit
1: Input signal from SOUT pin
Nothig is assigned.
P21/SOUT
Serial data
SOUT/P21
M37221M6-XXXSP/FP
M37221M6-XXXSP/FP
Fig. 2.7.7 Connection example for serial I/O transmit/receive
Transmit side
Receive side
LDM
CLB
SEB
LDM
#$0C, $DC
2, $FD
2, $FF
; Set serial I/O mode register.
; Reset serial I/O interrupt
request bit.
; Set the serial I/O interrupt
enable bit to “1.”
LDM
CLB
SEB
#DATA, $DD ; Write transfer data to serial wLDM
I/O register.
#$48, $DC
2, $FD
2, $FF
#$FF, $DD
; Set serial I/O mode
register.
; Reset serial I/O interrupt
request bit.
; Set serial I/O interrupt
enable bit to “1.”
; Write dummy data to
serial I/O register.
As a result of the above processing 1-byte data is transferred from the transmit side to the receive side.
When the transmit operation is completed, interrupts occur on both sides, so that completion of the data
transfer can be reported.
After that, repeating the processing after the symbol (w) can transmit/receive more data.
Fig. 2.7.8 Serial data transmit/receive processing sequence
2-46
7220 Group User’s Manual