UM10147_2
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 02 — 28 April 2008
57 of 134
NXP Semiconductors
UM10147
P89LPC952/954 User manual
the 9th data bit goes into RB8_n in Special Function Register SnCON 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. The SMOD1 bit is used by both UARTs.
10.4 Mode 3
11 bits are transmitted (through TXDn) or received (through RXDn): 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” on page 57
).
In all four modes, transmission is initiated by any instruction that uses SnBUF as a
destination register. Reception is initiated in Mode 0 by the condition RI_n = 0 and REN_n
= 1. Reception is initiated in the other modes by the incoming start bit if REN_n = 1.
10.5 SFR space
The UART SFRs are at the following locations:
10.6 Baud Rate generator and selection
The P89LPC952/954 enhanced UART has an independent Baud Rate Generator. The
baud rate is determined by a value programmed into the BRGR1_n and BRGR0_n SFRs.
Each UART can use either Timer 1 or the baud rate generator output as determined by
BRGCON_n[2:1] (see
). Note that Timer T1 is further divided by 2 if the SMOD1
bit (PCON.7) is set (and thus applies to both UARTs). The independent Baud Rate
Generator uses CCLK.
Table 44.
UART SFR addresses
Register
Description
SFR location
PCON
Power Control
87H
S0CON
Serial Port (UART0) Control
98H
S0BUF
Serial Port (UART0) Data Buffer
99H
S0ADDR
Serial Port (UART0) Address
A9H
S0ADEN
Serial Port (UART0) Address Enable
B9H
S0STAT
Serial Port (UART0) Status
BAH
BRGR1_0
Baud Rate Generator 0 High Byte
BFH
BRGR0_0
Baud Rate Generator 0 Low Byte
BEH
BRGCON_0
Baud Rate Generator 0 Control
BDH
S1CON
Serial Port (UART1) Control
B5H
S1BUF
Serial Port (UART1) Data Buffer
FFB0H
S1ADDR
Serial Port (UART1) Address
FFB2H
S1ADEN
Serial Port (UART1) Address Enable
FFB1H
S1STAT
Serial Port (UART1) Status
D4H
BRGR1_1
Baud Rate Generator 1 Rate High Byte FFB5H
BRGR0_1
Baud Rate GeneratoR 1 Rate Low
Byte
FFB4H
BRGCON_1
Baud Rate Generator 1 Control
FFB3H