August 1993
48
Philips Semiconductors
Product specification
16-bit microcontroller
P90CE201
9
UART SERIAL INTERFACE
9.1
General
This serial port is full duplex which means that it can
transmit and receive simultaneously. It is also
receive-buffered and can commence reception of a
second byte before a previously received byte has been
read from the receive register. (However, if the first byte
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
register SBUF. Writing to SBUF loads the Transmit
Register and reading SBUF accesses the physically
separate Receive Register. The baud rate for receiver and
transmitter can be generated by any timer using its baud
rate generator output.
9.2
The serial port can operate in one of four modes:
Operating modes
Mode 0:
Serial data enters and exits through RXD.
TXD outputs the shift clock. 8 data bits are
transmitted or received (LSB first).
The baud rate is fixed at 1/4 the basic
peripheral clock.
10 bits are transmitted (through TXD) or
received (through RXD): a start bit (0),
8 data bits (LSB first), and a stop bit (1).
On receive, the stop bit is stored in RB8 in
register SCON. The baud rate is variable.
Mode 1:
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.
Mode 2:
11 bits are transmitted (through TXD) or
received (through RXD): a start bit (0),
8 data bits (LSB first), a programmable 9th
data bit, and a stop bit (1). On transmit, the
9th data bit (TB8 in SCON) usually
represents the parity bit. On receive, the 9th
data bit is stored in RB8 in SCON, while the
stop bit is ignored. The baud rate is fixed at
3/32 of the BPCLK frequency.
11 bits are transmitted (through TXD) or
received (through RXD): a start bit (0), 8
data bits (LSB first), a programmable 9th
data bit and a stop bit (1). Mode 3 is the
same as Mode 2 except that the baud rate
in Mode 3 is variable.
Mode 3:
9.3
UART registers
9.3.1
UART S
HIFT
R
EGISTER
(SBUF)
The UART Shift Register resides at address 8000 2021H. SBUF contains the serial data to be transmitted or data just
being received. Bit 0 is transmitted or received first; i.e data is shifted from left to right.
Fig.31 UART Shift Register (SBUF).
bit 7
SBUF.7
bit 6
SBUF.6
bit 5
SBUF.5
bit 4
SBUF.4
bit 3
SBUF.3
bit 2
SBUF.2
bit 1
SBUF.1
bit 0
SBUF.0