Philips P89LPC907 Computer Monitor User Manual


 
Philips Semiconductors
User’s Manual - Preliminary -
P89LPC906/907/908
UART
2003 Dec 8 59
8. UART (P89LPC907, P89LPC908)
The P89LPC907 and P89LPC908 devices have 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 UART does include an independent Baud Rate
Generator. The baud rate can be selected from the CCLK (divided by a constant), Timer 1 overflow, or the independent Baud
Rate Generator.
The UART in the P89LPC907 does not include the RxD pin and descriptions of the receiver functions in this chapter do not apply
to the P89LPC907. The transmitter is available for use in applications requiring the transmission of serial data. Often the
transmitter function is useful for providing information during the debugging process.
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:
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 CCLK.
MODE 1
10 bits are transmitted (through TxD) or received (through RxD): a start bit (logical 0), 8 data bits (LSB first), and a stop bit (logical
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 "Baud Rate Generator and Selection" section).
MODE 2
11 bits are transmitted (through TxD) or received (through RxD): start bit (logical 0), 8 data bits (LSB first), a programmable 9th
data bit, and a stop bit (logical 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.
MODE 3
11 bits are transmitted (through TxD) or received (through RxD): a start bit (logical 0), 8 data bits (LSB first), a programmable 9th
data bit, and a stop bit (logical 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"
section).
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.