
CHAPTER 15 ASYNCHRONOUS SERIAL INTERFACE (UART)
User
’
s Manual U15862EJ3V0UD
446
(2/3)
RXEn
Enables/disables reception
0
Disables reception
Note
1
Enables reception
Set the RXEn bit to 1 after setting the UARTEn bit to 1 at startup. Set the UARTEn bit to 0 after setting the RXEn
bit to 0 to stop.
To initialize the reception unit status, clear (0) the RXEn bit, and after letting 2 Clock cycles (base clock) elapse,
set (1) the RXEn bit again. If the RXEn bit is not set again, initialization may not be successful. (For details about
the base clock, refer to
15.7.1 (1) Base clock (Clock)
.)
PSn1
PSn0
Transmit operation
Receive operation
0
0
Don
’
t output parity bit
Receive with no parity
0
1
Output 0 parity
Receive as 0 parity
1
0
Output odd parity
Judge as odd parity
1
1
Output even parity
Judge as even parity
To overwrite the PSn1 and PSn0 bits, first clear (0) the TXEn and RXEn bits.
If
“
0 parity
”
is selected for reception, no parity judgment is performed. Therefore, no error interrupt is generated
because the PEn bit of the ASISn register is not set.
Even parity
If the transmit data contains an odd number of bits with the value
“
1
”
, the parity bit is set (1). If it contains an even
number of bits with the value
“
1
”
, the parity bit is cleared (0). This controls the number of bits with the value
“
1
”
contained in the transmit data and the parity bit so that it is an even number.
During reception, the number of bits with the value
“
1
”
contained in the receive data and the parity bit is counted,
and if the number is odd, a parity error is generated.
Odd parity
In contrast to even parity, odd parity controls the number of bits with the value
“
1
”
contained in the transmit data
and the parity bit so that it is an odd number.
During reception, the number of bits with the value
“
1
”
contained in the receive data and the parity bit is counted,
and if the number is even, a parity error is generated.
0 parity
During transmission, the parity bit is cleared (0) regardless of the transmit data.
During reception, no parity error is generated because no parity bit is checked.
No parity
No parity bit is added to transmit data.
During reception, the receive data is considered to have no parity bit. No parity error is generated because there
is no parity bit.
Note
When reception is disabled, the reception shift register does not detect a start bit. No shift-in
processing or transfer processing to reception buffer register n (RXBn) is performed, and the
contents of the RXBn register are retained.
When reception is enabled, the reception shift operation starts, synchronized with the detection of
the start bit, and when the reception of one frame is completed, the contents of the reception shift
register are transferred to the RXBn register. A reception completion interrupt (INTSRn) is also
generated in synchronization with the transfer to the RXBn register.