APPLICATION
2.5 Serial I/O
3822 GROUP USER’S MANUAL
2–126
Fig. 2.5.17 Structure of UART control register
(4) UART control register (address 001B16)
Controls the transfer data format in the UART mode and the output format of the P45/TxD pin.
sCharacter length selection bit (bit 0)
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.
sParity 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.
sParity selection bit (bit 2)
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.
sStop bit length selection bit (bit 3)
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.
sP45/TxD P-channel output disable bit (bit 4)
Controls the output type of the P45/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.”
b7 b6 b5 b4 b3 b2 b1 b0
UART control register (UARTCON) [Address 1B 16]
B
At reset R W
UART control register
0
1
2
3
4
5
to
7
0
1
Name
Functions
Character length
selection bit (CHAS)
0: 8 bits
1: 7 bits
Parity enable bit
(PARE)
0: Parity checking disabled
1: Parity checking enabled
Stop bit length
selection bit (STPS)
0: 1 stop bit
1: 2 stop bits
P45/TxD P-channel
output disable bit
(POFF)
0: CMOS output (in output mode)
1: N-channel open-drain output
(in output mode)
Nothing is allocated. These bits cannot be written
to and are fixed to “1” at reading.
Parity selection bit
(PARS)
0: Even parity
1: Odd parity
×
1