English
Language : 

7220 Datasheet, PDF (69/303 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER
FUNCTIONAL DESCRIPTION
2.7 Serial I/O
2.7.2 Serial I/O register (address 00DD16)
The serial I/O register is serial-parallel conversion register used for data transfer. This register consists of
8-bit and can be used as both transmit and receive register.
Serial I/O register is assigned to address 00DD16.
Although data transfer is performed bit by bit, it is possible to specify whether the data is transferred
beginning with most-significant-bit (MSB) or least-significant-bit (LSB) by using bit 5 of the serial I/O mode
register.
(1) When bit 5 of the serial I/O mode register is “0”
q Receive: Data is received bit by bit beginning with the MSB (bit 7) of the serial I/O register.
q Transmit: Data is transmitted bit by bit beginning with the LSB (bit 0) of the serial I/O register.
(2) When bit 5 of the serial I/O mode register is “1”
q Receive: Data is received bit by bit beginning with the LSB (bit 0) of the serial I/O register.
q Transmit: Data is transmitted bit by bit beginning with the MSB (bit 7) of the serial I/O register.
2.7.3 Clock source generating circuit
The clock source generating circuit can select oscillation frequency divided by 4, 16, 32, and 64 as the
internal clock. Also, it can select an external clock (the external clock is selected immediately after reset).
Bit 2 of the serial I/O mode register specifies internal clock or external clock. When bit 2 of the serial
I/O mode register is set to “0,” an external clock is
selected, when “1,” an internal clock is selected.
When selecting an internal clock, set the division Table 2.7.1 Clock source selection
of oscillation frequency by bits 0 and 1 of the serial
I/O mode register.
Serial I/O clock
Serial I/O mode register
Bit 2
Bit 1
Bit 0
q Oscillation frequency divided by 4:
External clock
0
0 or 1 (Invalid)
set both bits 1 and 0 to “0.”
q Oscillation frequency divided by 16:
set bit 1 = “0” and bit 0 = “1.”
q Oscillation frequency divided by 32:
set bit 1 = “1” and bit 0 = “0.”
f(XIN)/4
0
0
Internal f(XIN)/16
1
0
1
clock
f(XIN)/32
1
0
f(XIN)/64
1
1
q Oscillation frequency divided by 64:
set both bit 1 and 0 to “1.”
The contents of bits 0 and 1 of the serial I/O mode register are invalid, when selecting an external clock.
2.7.4 Serial input/output common transmission/reception mode
Pin P21/SOUT can also be used as the serial I/O data input pin when the serial input pin selection bit (bit
6 of the serial I/O mode register; address 00DC16) is set to “1.” (It is not necessary to set the corresponding
bit of port P2 direction register to input mode.)
With this function, pin P22/SIN can also be used as general-purpose input port P22.
P20/SCLK
P21/SOUT
Input or output
Clock
Transmit mode
“1”
SM6 “0”
Serial I/O register (8)
Receive mode
P22/SIN
Port P22 data
Note: To start receiving, set “FF16” to the serial I/O register
SM: Serial I/O register
Fig. 2.7.3 Serial input/output common transfer mode block diagram
2-42
7220 Group User’s Manual