August 1993
49
Philips Semiconductors
Product specification
16-bit microcontroller
P90CE201
9.3.2
UART C
ONTROL
R
EGISTER
(SCON)
The Serial Port Control Register and Status Register (SCON) contains not only the mode selection bits, but also the 9th
data bit for transmit and receive (TB8 and RB8), and the serial port interrupt bits (TI and RI). SCON has a default value
of 00H.
Table 42
Description of SCON bits.
Table 43
Selection of the serial port modes.
SYMBOL
BIT
FUNCTION
SM0
SM1
SM2
SCON.7
SCON.6
SCON.5
These two bits are used to select the serial port mode. See Table 43.
Enables the multiprocessor communication feature in Modes 2 and 3. In Modes 2
and 3, if SM2 = 1, then RI will not be activated if the received 9th data bit (RB8) is
a logic 0. In Mode 1, if SM2 = 1, then RI will not be activated unless a valid stop bit
was received. In Mode 0, SM2 should be a logic 0.
Enables serial reception and is set by software to enable reception, and cleared
by software to disable reception.
The 9th data bit that will be transmitted in Modes 2 and 3. Set or cleared by
software as required.
In Modes 2 and 3, RB8 is the 9th data bit that is received. In Mode 1, if SM2 = 0,
then RB8 is the stop bit that was received. In Mode 0, RB8 is not used.
Transmit Interrupt flag. Set by hardware at the end of the 8th bit time in Mode 0, or
at the beginning of the stop bit time in the other modes, in any serial transmission.
Must be cleared by software.
Receive Interrupt flag. Set by hardware at the end of the 8th bit time in Mode 0, or
halfway through the stop bit time in the other modes, in any serial transmission
(however see SM2). Must be cleared by software.
REN
SCON.4
TB8
SCON.3
RB8
SCON.2
TI
SCON.1
RI
SCON.0
SM0
SM1
MODE
DESCRIPTION
BAUD RATE
0
0
1
1
0
1
0
1
0
1
2
3
Shift register
8-bit UART
9-bit UART
9-bit UART
BPCLK/4
variable
3/32 BPCLK
variable
Fig.32 UART Control Register (SCON).
bit 7
SM0
bit 6
SM1
bit 5
SM2
bit 4
REN
bit 3
TB8
bit 2
RB8
bit 1
TI
bit 0
RI