
R8C/38T-A Group
20. Serial Interface (UART2)
Under development Preliminary document
Specifications in this document are tentative and subject to change.
R01UH0241EJ0010 Rev.0.10
Page 422 of 730
Aug 05, 2011
20.3.2
Clock Asynchronous Serial I/O (UART) Mode
In UART mode, data is transmitted and received after setting the desired bit rate and transfer data format.
Table20.7 lists the Registers and Settings Used in UART Mode.
Notes:
1. Write 0 to bits that are not listed above when writing in clock asynchronous I/O mode.
2. The bits used for transmit/receive data are as follows:
- Bits b0 to b6 when transfer data is 7 bits long
- Bits b0 to b7 when transfer data is 8 bits long
- Bits b0 to b8 when transfer data is 9 bits long
3. When the transfer data length is 7 bits, the contents of bits b7 and b8 are 0. When the transfer data length is 8
bits, the content of the b8 bit is 0.
Table 20.7
Registers and Settings Used in UART Mode (1) Register
Bit
Function
U2TB
b0 to b8
U2RB
b0 to b8
Receive data can be read.
(2, 3)OER, FER, PER, SUM
Error flag
U2BRG
b0 to b7
Set the bit rate.
U2MR
SMD2 to SMD0
Set to 100b when transfer data is 7 bits long.
Set to 101b when transfer data is 8 bits long.
Set to 110b when transfer data is 9 bits long.
CKDIR
Select an internal clock or external clock.
STPS
Select the stop bit.
PRY, PRYE
Select whether parity is included and whether odd or even.
IOPOL
Select the TXD2 and RXD2 I/O polarity.
U2C0
CLK0, CLK1
Select the U2BRG count source.
CRS
Select either the CTS or RTS function, if using.
TXEPT
Transmit register empty flag
CRD
Enable or disable the CTS or RTS function.
NCH
Select the output format of the TXD2 pin.
UFORM
Select LSB first or MSB first when transfer data is 8 bits long.
Set to 0 when transfer data is 7 or 9 bits long.
U2C1
TE
Set to 1 to enable transmission.
TI
Transmit buffer empty flag
RE
Set to 1 to enable reception.
RI
Reception complete flag
U2IRS
Select the UART2 transmit interrupt source.
U2LCH
Set to 1 to use inverted data logic.
U2RXDF
DF2EN
Select the digital filter disabled or enabled.