UM10346_1
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 01 — 2 November 2009
56 of 132
NXP Semiconductors
UM10346
LPC980/982 User manual
10. UART
The P89LPC980/982 has an enhanced UART that is compatible with the conventional
80C51 UART except that Timer 2 overflow cannot be used as a baud rate source. The
P89LPC980/982 does include an independent Baud Rate Generator. The baud rate can
be selected from the oscillator (divided by a constant), Timer 1 overflow, or the
independent Baud Rate Generator. In addition to the baud rate generation, enhancements
over the standard 80C51 UART include Framing Error detection, break detect, automatic
address recognition, selectable double buffering and several interrupt options.
The UART can be operated in 4 modes, as described in the following sections.
10.1 Mode 0
Serial data enters and exits through RXD. TXD outputs the shift clock. 8 bits are
transmitted or received, LSB first. The baud rate is fixed at
1
⁄
16
of the CPU clock
frequency.
10.2 Mode 1
10 bits are transmitted (through TXD) or received (through RXD): a start bit (logic 0), 8
data bits (LSB first), and a stop bit (logic 1). When data is received, the stop bit is stored in
RB8 in Special Function Register SCON. The baud rate is variable and is determined by
the Timer 1 overflow rate or the Baud Rate Generator (see
).
10.3 Mode 2
11 bits are transmitted (through TXD) or received (through RXD): start bit (logic 0), 8 data
bits (LSB first), a programmable 9th data bit, and a stop bit (logic 1). When data is
transmitted, the 9th data bit (TB8 in SCON) can be assigned the value of 0 or 1. Or, for
example, the parity bit (P, in the PSW) could be moved into TB8. When data is received,
the 9th data bit goes into RB8 in Special Function Register SCON and the stop bit is not
saved. The baud rate is programmable to either
1
⁄
16
or
1
⁄
32
of the CCLK frequency, as
determined by the SMOD1 bit in PCON.
10.4 Mode 3
11 bits are transmitted (through TXD) or received (through RXD): a start bit (logic 0), 8
data bits (LSB first), a programmable 9th data bit, and a stop bit (logic 1). Mode 3 is the
same as Mode 2 in all respects except baud rate. The baud rate in Mode 3 is variable and
is determined by the Timer 1 overflow rate or the Baud Rate Generator (see
“Baud Rate generator and selection”
).
In all four modes, transmission is initiated by any instruction that uses SBUF as a
destination register. Reception is initiated in Mode 0 by the condition RI = 0 and REN = 1.
Reception is initiated in the other modes by the incoming start bit if REN = 1.
10.5 SFR space
The UART SFRs are at the following locations: