Serial I/O Data Receive Method (When An Internal Clock Is Selected); Fig. 2.7.4 Serial I/O Register When Receiving (When Sm5 = "0") - Renesas 7200 Series User Manual

Mitsubishi 8-bit single-chip microcomputer
Table of Contents

Advertisement

2.7.5 Serial I/O data receive method (when an internal clock is selected)

(1) Initialization
First, set the serial I/O mode register (address 00DC
Select the synchronous clock (SM2 = "1," SM1, SM0).
Set P2
as pin S
0
since the serial I/O port selection bit (SM3) is also used for setting pin S
set as pin S
Select the serial input pin by the serial input pin selection bit (SM6). When SM6 = "0," signal is
input from pin P2
input pin, set the port P2 direction register to input mode ("0"). For pins P2
corresponding bits of the port P2 direction register are automatically set by setting the serial I/O
mode register.
(2) Receive enable state
After the above setting have been made, write "FF
serial I/O counter is then set to "07
(3) Receive operation
The data from the serial I/O data input pins (S
I/O register in synchronization with rising edges of the transfer clock.
Receive operation is performed according to bit 5 (SM5) of the serial I/O mode register:
When SM5 is set to "0," data is received from MSB (bit 7) of the register and shifted to the right
(to low-order bit) every time new data is received.
When SM5 is set to "1," data is received from LSB (bit 0) of the register and shifted to the left (to
high-order bit) every time new data is received.
When all 8-bit data have been received, the serial I/O interrupt request bit (bit 2) of the interrupt
request register 2 (address 00FD
When receiving
Note: To start receiving, set "FF

Fig. 2.7.4 Serial I/O register when receiving (when SM5 = "0")

(SM3 = "1"). Pin P2
CLK
and loses its general-purpose I/O port function.
OUT
/S
; when SM6 = "1," signal is input from pin P2
2
IN
16
) is set to "1."
16
Transfer clock
7220 Group User's Manual
FUNCTIONAL DESCRIPTION
) as follows.
16
/S
is not used when receiving serial data. However,
1
OUT
" to the serial I/O register (address 00DD
16
" during the write cycle and receive is enabled.
or S
) is received one bit at a time into the serial
IN
OUT
MSB
D
0
D
D
1
0
D
D
2
1
D
D
7
6
" to the serial I/O register.
16
, port P2
OUT
/S
. When pin P2
1
OUT
/S
0
CLK
D
0
D
D
D
D
D
5
4
3
2
1
Serial I/O register
2.7 Serial I/O
is automatically
1
/S
is a
2
IN
and P2
/S
, the
1
OUT
). The
16
LSB
D
0
2-43

Advertisement

Table of Contents
loading

This manual is also suitable for:

7220

Table of Contents