English
Language : 

7220 Datasheet, PDF (71/303 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER
FUNCTIONAL DESCRIPTION
2.7 Serial I/O
2.7.6 Serial I/O data transmit method (when an external clock is selected)
(1) Initialization
First, set the serial I/O mode register (address 00DC16) as follows.
Œ Select the synchronous clock (SM2 = “0”).
 Set P20 as pin SCLK (SM3 = “1”). Since the serial I/O port selection bit (SM3) is also used for the
setting pin SOUT, port P21 is automatically becomes the SOUT pin.
Note: It is not necessary to set pin P22/SIN as pin SIN when transmitting. It can be used as general-
purpose input pin.
(2) Transmit enable state
When transmit data are written to the serial I/O register, the serial I/O counter is set to “0716” and
transmit is enabled.
(3) Transmit operation
When transmit is enabled (the serial I/O counter value = “0716”), simultaneously, the data of the serial
I/O register is transmitted from pin P21/SOUT in synchronization with a falling edge of the transfer
clock.
Transmission is performed according to bit 5 (SM5) of the serial I/O mode register:
Œ When SM5 is set to “0,” data is transmitted from LSB (bit 0) of the register and shifted to the right
(to low-order bit) every time new data is transmitted.
 When SM5 is set to “1,” data is transmitted from MSB (bit 7) of the register and shifted to the left
(to high-order bit) every time new data is transmitted.
When all 8-bit data have been transmitted, the serial I/O interrupt request bit (bit 2) of the interrupt
request register 2 (address 00FD 16) is set to “1.”
Pin P21/SOUT will be in after transmit operation has been completed.
Note: On programming, note that the serial I/O counter is set even by writing to the serial I/O register
with bit management instructions, such as SEB and CLB.
When transmitting
Transfer clock
MSB
LSB
D7 D6 D5 D4 D3 D2 D1 D0
D7 D6 D5 D4 D3 D2 D1
D0
D7 D6 D5 D4 D3 D2
D1
D7 D6 D5 D4 D3
D2
•
•
•
D7
Serial I/O register
Fig. 2.7.5 Serial I/O register when transmitting (when SM5 = “0”)
2-44
7220 Group User’s Manual