User Manual
626
Rev. 1.1
2019-03-18
TLE984xQX
Microcontroller with LIN and Power Switches for Automotive Applications
UART1/UART2
19.3.3
Mode 2, 9-Bit UART, Fixed Baud Rate
In mode 2, the UART behaves as a 9-bit serial port. A start bit (0), 8 data bits plus a programmable 9th bit and
a stop bit (1) are transmitted on TXD or received on RXD. The 9th bit for transmission is taken from TB8
(SCON.3) while for reception, the 9th bit received is placed in RB8 (SCON.2).
The transmission cycle is activated by a write to SBUF. The data is transferred to the transmit shift register and
TB8 is copied into the 9th bit position. At phase 1 of the machine cycle following the next rollover in the divide-
by-16 counter, the start bit is copied to TXD and data is activated one bit time later. One bit time after the data
is activated, the data starts shifting right. For the first shift, a stop bit (1) is shifted in from the left and for
subsequent shifts, zeros are shifted in. When the TB8 bit gets to the output position, the control block executes
one last shift and sets the TI bit.
Reception is started by a high to low transition on RXD (sampled at 16 times of the baud rate). The divide-by-
16 counter is then reset and 1111 1111
B
is written to the receive register. If a valid start bit (0) is then detected
(based on two out of three samples), it is shifted into the register followed by 8 data bits. If the transition is not
followed by a valid start bit, the controller goes back to looking for a high to low transition on RXD. When the
start bit reaches the leftmost position, the control block executes one last shift, then loads SBUF with the 8
data bits, loads RB8 (SCON.2) with the 9th data bit, and sets the RI bit, provided RI = 0 (SCON.0), and either
SM2 = 0 (SCON.5) (see
) or the 9th bit = 1. If none of these conditions is met, the received byte is
lost.
The baud rate for the transfer is fixed at
f
sys
/64 or
f
sys
/32.
19.3.4
Mode 3, 9-Bit UART, Variable Baud Rate
Mode 3 is the same as mode 2 in all respects except that the baud rate is variable.
The associated timings for transmit/receive in modes 2 and 3 are illustrated in
.