33
7641 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
MITSUBISHI MICROCOMPUTERS
PRELIMINARY
Notice: This is not a final specification.
change.
Some parametric limits are subject to
CTS (Clear-to-Send) Function
As a transmitter, the UART can be configured to recognize the
Clear-to-Send (CTSx) input as a handshaking signal. This is en-
abled by setting the CTS Function Enable Bit (bit 5 of UxCON) to
“
1
”
. If CTS function is enabled, even when transmission is enabled
and the UARTx transmit buffer register is filled with the data, the
transmission never starts; but it will start when inputting
“
L
”
to the
CTSx pin.
Figures 27 and 28 show the UARTx transmit timings.
U
T
X
D
o
P
u
t
p
u
U
t
T
(
P
X
8
4
/
D
2
/
U
S
T
R
X
D
1
,
D
Y
8
0
/
)
D
0
D
1
SP
S
T
D
2
D
3
D
4
D
5
D
6
D
7
P
ST
S
P
D
0
D
1
D
2
D
3
D
4
D
5
D
6
D
7
P
C
S
2
/
T
S
S
x
X
p
i
n
)
(
P
8
6
/
C
T
S
1
,
P
8
2
/
C
T
R
D
T
r
a
n
s
f
e
r
c
l
o
c
k
T
r
a
n
m
i
t
e
n
a
b
l
e
b
i
t
T
r
a
n
s
e
m
m
i
t
p
b
t
y
u
f
l
f
a
e
r
f
g
T
r
a
n
s
m
i
t
c
o
m
p
l
e
t
e
f
l
a
g
Data set into UARTx transmit buffer register 1
Data transferring from UARTx
transmit buffer register 1 to Transmit shift register 1
Halt due to CTS =
“
H
”
Halt due to Tranmit
enable bit =
“
0
”
T
h
C
P
1
i
h
a
s
s
a
r
t
t
r
t
o
i
a
y
p
m
c
i
t
n
e
n
i
g
r
a
t
b
a
l
e
p
n
e
p
g
d
l
y
t
h
i
n
g
=
8
t
o
t
i
h
t
s
e
c
o
n
d
i
t
i
o
n
s
:
b
i
e
b
l
UART Receive Operation
Reception is enabled when the Receive Enable Bit is
“
1
”
. Detec-
tion of the start bit makes transfer clocks generated and the data
reception starts in the LSB first.
When using 9-bit character length, read the received data from the
UARTx receive buffer register 2 (high-order byte) first before the
UARTx receive buffer register 1 (low-order byte).
Reception requires the following setup:
(1) Define a baud rate by setting a value n (n = 0 to 255) into
UARTx baud rate generator (addresses 0031
16
, 0039
16
).
(2) Set the Receive Initialization Bit (bit 3 of UxCON) to
“
1
”
.
(3) Configure the data format and clock selection by setting the
UARTx mode register.
(4) Set the RTS Function Enable Bit (bit 5 of UxCON) if RTS func-
tion will be used.
(5) Set the Receive Enable Bit (bit 1 of UxCON) to
“
1
”
.
Fig. 27 UARTx transmit timing (CTS function enabled)
UART Transmit Operation
Transmission starts when the Transmit Enable Bit is
“
1
”
and the
Transmit Buffer Empty Flag is
“
0
”
. Additionally, when CTS function
enabled, the CTSx pin must be
“
L
”
to be started. The data in which
Start Bit and Stop Bit or Parity Bit are also added is transmitted
from the low-order byte sequentially. When using 9-bit character
length, set the data into the UARTx transmit buffer register 2
(high-order byte) first before the UARTx transmit buffer register 1
(low-order byte).
Once the transmission starts, the Transmit Enable Bit, the Trans-
mit Buffer Empty Flag and the CTSx pin state (when this is
enabled) could not be checked until the transmission in progress
has ended.
Transmission requires the following setup:
(1) Define a baud rate by setting a value n (n = 0 to 255) into
UARTx baud rate generator (addresses 0031
16
, 0039
16
).
(2) Set the Transmit Initialization Bit (bit 2 of UxCON) to
“
1
”
. This
will set the UARTx status register to
“
03
16
”
.
(3) Select the interrupt source with the Transmit Interrupt Source
Select Bit (bit 4 of UxCON).
(4) Configure the data format and clock selection by setting the
UARTx mode register.
(5) Set the CTS Function Enable Bit (bit 5 of UxCON) if CTS func-
tion will be used.
(6) Set the Transmit Enable Bit (bit 0 of UxCON) to
“
1
”
.
If updating a value of UARTx baud rate generator while the data is
being transmitted, be sure to disable the transmission before up-
dating. If the former data remains in the UARTx transmit buffer
registers 1 and 2 at retransmission, an undefined data might be
output.