© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 59 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
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 Section 10.6
“Baud Rate generator and selection” on page 59).
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:
10.6 Baud Rate generator and selection
The P89LPC932A1 enhanced UART has an independent Baud Rate Generator. The baud
rate is determined by a value programmed into the BRGR1 and BRGR0 SFRs. The UART
can use either Timer 1 or the baud rate generator output as determined by BRGCON[2:1]
(see Figure 25
). Note that Timer T1 is further divided by 2 if the SMOD1 bit (PCON.7) is
set. The independent Baud Rate Generator uses CCLK.
Table 46: UART SFR addresses
Register Description SFR location
PCON Power Control 87H
SCON Serial Port (UART) Control 98H
SBUF Serial Port (UART) Data Buffer 99H
SADDR Serial Port (UART) Address A9H
SADEN Serial Port (UART) Address Enable B9H
SSTAT Serial Port (UART) Status BAH
BRGR1 Baud Rate Generator Rate High Byte BFH
BRGR0 Baud Rate Generator Rate Low Byte BEH
BRGCON Baud Rate Generator Control BDH