1997 Dec 15
30
Philips Semiconductors
Product specication
8-bit microcontrollers
P83C524; P80C528; P83C528
12 SERIAL PORT (UART)
The Serial Port is functionally similar to the implementation
in the 8052AH, with the possibility of two different baud
rates for receive and transmit with Timer 1 and Timer 2 as
baud rate generators. It is full duplex, meaning it can
receive and transmit simultaneously. It is also
receive-buffered, meaning it can commence reception of a
second byte before a previously received byte has been
read from the receive register. However, if the first byte still
has not been read by the time the reception of the second
byte is complete, one of the bytes will be lost. The Serial
Port receive and transmit registers are both accessed as
SBUF SFR. Writing to SBUF loads the transmit register,
and reading SBUF accesses the physically separate
receive register. The Serial Port can operate in one of four
modes:
Mode 0 serial data enters and exits through RXD. TXD
outputs the shift clock. 8 bits are
transmitted/received: 8 data bits (LSB rst). The
baud rate is xed at 1/12 the oscillator frequency.
Mode 1 10 bits are transmitted (through TXD) or received
(through RXD): a start bit (0), 8 data bits (LSB
rst), and a stop bit (1). On receive, the stop bit
goes into RB8 in SCON SFR. The baud rate is
variable.
Mode 2 11 bits are transmitted (through TXD) or received
(through RXD): a start bit (0), 8 data bits (LSB
rst), a programmable 9th data bit, and a stop bit
(1). On transmit, the 9th data bit (TB8 in SCON)
can be assigned the value of 0 or 1. For example,
the parity bit (P, in the PSW) could be moved into
TB8. On receive, the 9th data bit goes into RB8 in
SCON, while the stop bit is ignored. The baud
rate is programmable to either 1/32 or 1/64 the
oscillator frequency.
Mode 3 11 bits are transmitted (through TXD) or received
(through RXD): a start bit (0), 8 data bits (LSB
rst), a programmable 9th data bit, and a stop bit
(1). In fact, Mode 3 is the same as Mode 2 in all
respects except the baud rate. The baud rate in
Mode 3 is variable.
In all four modes, transmission is initiated by any
instruction that uses SBUF as a destination register. In
Mode 0, reception is initiated by the condition RI = 0 and
REN = 1. Reception is initiated by incoming start bit if
REN = 1 in the other modes.