![](http://datasheet.mmic.net.cn/30000/M30263F3AFP_datasheet_2358719/M30263F3AFP_155.png)
13. Serial I/O
page 138
9
2
3
f
o
7
0
2
,
5
1
.
b
e
F
0
.
2
.
v
e
R
0
2
0
-
2
0
2
0
B
9
0
J
E
R
)
T
6
2
/
C
6
1
M
,
B
6
2
/
C
6
1
M
,
A
6
2
/
C
6
1
M
(
p
u
o
r
G
A
6
2
/
C
6
1
M
Figure 13.1.6. U0C0 to U2C0 registers and UCON register
UARTi Transmit/receive Control Rregister 0 (i=0 to 2)
Symbol
Address
After Reset
U0C0 to U2C0
03A416, 03AC16, 037C16
000010002
b7
b6
b5
b4
b3
b2
b1
b0
Function
TXEPT
CLK1
CLK0
CRS
CRD
NCH
CKPOL
BRG count source
select bit
Transmit register empty
flag
0 : Transmit data is output at falling edge of transfer clock
and receive data is input at rising edge
1 : Transmit data is output at rising edge of transfer clock
and receive data is input at falling edge
CLK polarity select bit
CTS/RTS function
select bit
CTS/RTS disable bit
Data output select bit(5)
0 0 : f1SIO or f2SIO is selected
0 1 : f8SIO is selected
1 0 : f32SIO is selected
1 1 : Do not set
b1 b0
0 : LSB first
1 : MSB first
0 : Data in transmit register (during transmission)
1 : No data in transmit register
(transmission completed)
0 : CTS/RTS function enabled
1 : CTS/RTS function disabled
(P60, P64 and P73 can be used as I/O ports)(6)
0 : TxDi/SDA2 and SCL2 pins are CMOS output
1 : TxDi/SDA2 and SCL2 pins are N-channel open-drain output(4)
UFORM Transfer format select bit
(2)
Effective when CRD is set to "0"
0 : CTS function is selected (1)
1 : RTS function is selected
Bit Name
Bit
Symbol
NOTES:
1. Set the corresponding port direction bit for each CTSi pin to “0” (input mode).
2. Effective when the SMD2 to SMD0 bits in the UMR register to "0012"(clock synchronous serial I/O mode) or "0102" (UART mode
transfer data 8 bits long). Set the UFORM bit to "1" when the SMD2 to SMD0 bits are set to "1012" (I2C bus mode) and "0" when
they are set to"100 2" (UART mode transfer data 7 bits long) or "1102" ( UART mode transfer data 9 bits long).
3. CTS1/RTS1 can be used when the CLKMD1 bit in the UCON register is set to “0” (only CLK1 output) and the RCSP bit in the
UCON register is set to “0” (CTS0 /RTS0 not separated).
4. SDA2 and SCL2 are effective when i = 2.
5. When the SMD2 to SMD0 bits in UiMR regiser are set to “0002” (serial I/O disable), do not set NCH bit to “1” (TxDi/SDA2 and
SCL2 pins are N-channel open-drain output).
6. When the U1MAP bit in PACR register is “1” (P73 to P70), CTS/RTS pin in UART1 is assigned to P70.
7. When the CLK1 and CLK0 bit settings are changed, set the UiBRG register.
RW
RO
(3)
(7)
UART Transmit/receive Control Register 2
Symbol
Address
After Reset
UCON
03B016
X00000002
b7
b6
b5
b4
b3
b2
b1
b0
Bit Name
Bit Symbol
RW
Function
CLKMD0
CLKMD1
UART0 transmit interrupt
cause select bit
UART0 continuous
receive mode enable bit
0: Continuous receive mode disabled
1: Continuous receive mode enable
UART1 continuous
receive mode enable bit
UART1 CLK/CLKS
select bit 0
UART1 transmit interrupt
cause select bit
0: Transmit buffer empty (Tl = 1)
1: Transmission completed (TXEPT = 1)
0: Transmit buffer empty (Tl = 1)
1: Transmission completed (TXEPT = 1)
0: Continuous receive mode disabled
1: Continuous receive mode enabled
Nothing is assigned. When write, set to “0”.
When read, the content is indeterminate
U0IRS
U1IRS
U0RRM
U1RRM
UART1 CLK/CLKS
select bit 1 (1)
Effective when CLKMD1 bit is set to “1”
0: Clock output from CLK1
1: Clock output from CLKS1
RCSP
Separate UART0
CTS/RTS bit
(b7)
RW
NOTES:
1. To use more than one transfer clock output pins, set the CKDIR bit in the U1MR register to “0” (internal clock).
2. When the U1MAP bit in PACR register is set to “1” (P73 to P70), CTS0 is supplied from the P70 pin.
0: Output from CLK1 only
1: Transfer clock output from multiple
pins function selected
0: CTS/RTS shared pin
1: CTS/RTS separated (CTS0 supplied
from the P64 pin)(2)