
APPLICATION
2.5 Serial I/O1
3820 GROUP USER’S MANUAL
2–127
(4) UART control register (UARTCON)
This register (address 001B
16
) controls the transfer data format in the UART mode and the output
format of the P4
5
/TxD pin.
Fig. 2.5.17 Structure of UART control register
I
Character length selection bit (bit 0)
This bit selects data bit length of the UART transfer data format.
In the “0” state, the data bit length is 8 bits. In the “1” state, the data bit length is 7 bits.
I
Parity enable bit (bit 1)
This bit is set to “1” to make a parity check and to “0” to make no parity check.
In the “1” state, the parity error flag becomes valid.
I
Parity selection bit (bit 2)
This bit selects a parity type of the UART transfer data format.
In the “0” state, the parity type is an even parity. In the “1” state, it is an odd parity.
I
Stop bit length selection bit (bit 3)
This bit selects a stop bit length of the UART transfer data format.
In the “0” state, the stop bit length is 1 stop bit.
In the “1” state, the stop bit length is 2 stop bits.
I
P4
5
/TxD P-channel output disable bit (bit 4)
This bit controls the output type of the P4
5
/TxD pin.
In the “0” state, the output type is CMOS output in the output mode. In the “1” state, the output type
is N-channel open-drain output in the output mode.
The 5 low-order bits of the UART control register can be read and written. The 3 high-order bits are
unused and read-only bits. At reading, all the bits are set to “1.”
b7b6 b5b4b3 b2b1b0
UART control register (UARTCON) [Address 1B
16
]
B
0
At reset R W
0
UART control register
1
2
3
4
5
to
7
0
0
0
0
1
Name
Functions
Character length
selection bit (CHAS)
Parity enable bit
(PARE)
Parity selection bit
(PARS)
0: 8 bits
1: 7 bits
0: Parity checking disabled
1: Parity checking enabled
0: Even parity
1: Odd parity
Stop bit length
selection bit (STPS)
P4
5
/TxD P-channel
output disable bit
(POFF)
Nothing is allocated. These bits cannot be written
to and are fixed to “1” at reading.
0: 1 stop bit
1: 2 stop bits
0:
CMOS output (in output mode)
1:
N-channel open-drain output
(in output mode)
×
1