R01UH0136EJ0210 Rev.2.10
Page 479 of 800
Jul 31, 2012
M16C/64A Group
23. Serial Interface UARTi (i = 0 to 2, 5 to 7)
Table 23.12
Registers Used and Settings in UART Mode
(1)
Register
Bits
Function
PCLKR
PCLK1
Select the count source for the UiBRG register.
UiTB
0 to 8
Set transmission data.
UiRB
0 to 8
Reception data can be read.
OER, FER, PER, SUM
Error flag
11
When read, the read value is undefined.
UiBRG
0 to 7
Set bit rate.
UiMR
SMD2 to SMD0
Set to 100b when character bit length is 7 bits.
Set to 101b when character bit length is 8 bits.
Set to 110b when character bit length is 9 bits.
CKDIR
Select the internal clock or external clock.
STPS
Select number of stop bits.
PRY, PRYE
Select whether parity is included and whether odd or even.
IOPOL
Select the TXD/RXD input/output polarity.
UiC0
CLK0, CLK1
Select the count source for the UiBRG register.
CRS
If
CTS
or
RTS
is used, select which function to use.
TXEPT
Transmit register empty flag
CRD
Enable or disable the
CTS
or
RTS
function.
NCH
Select TXDi pin output mode.
(3)
CKPOL
Set to 0.
UFORM
LSB first or MSB first can be selected when character bit length is 8 bits. Set to 0
when character bit length is 7 or 9 bits.
UiC1
TE
Set to 1 to enable transmission.
TI
Transmit buffer empty flag
RE
Set to 1 to enable reception.
RI
Reception complete flag
UjIRS
Select source of UARTj transmit interrupt.
UjRRM
Set to 0.
UiLCH
Set to 1 to use reversed data logic.
UiERE
Set to 0.
UiSMR
0 to 7
Set to 0.
UiSMR2
0 to 7
Set to 0.
UiSMR3
0 to 7
Set to 0.
UiSMR4
0 to 7
Set to 0.
UCON
U0IRS
Select source of UART0 transmit interrupt.
U1IRS
Select source of UART1 transmit interrupt.
U0RRM
Set to 0.
U1RRM
Set to 0.
CLKMD0
Disabled because CLKMD1 is 0
CLKMD1
Set to 0.
RCSP
Set to 1 to input
CTS0
signal of UART0 from the P6_4 pin.
7
Set to 0.
i = 0 to 2, 5 to 7; j = 2, 5 to 7
Notes:
1.
This table does not describe a procedure.
2.
The bits used for transmit/receive data are as follows: Bits 0 to 6 when character bit length is 7 bits; bits 0 to
7 when character bit length is 8 bits; bits 0 to 8 when character bit length is 9 bits.
3.
The TXD2 pin is N-channel open drain output. Nothing is assigned to the NCH bit in the U2C0 register. If
necessary, set it to 0.
4.
The values of bits 7 and 8 are undefined when character bit length is 7 bits.
The values of bit 8 is undefined when character bit length is 8 bits.
Содержание M16C/60 Series
Страница 853: ...M16C 64A Group R01UH0136EJ0210...