MS51
Dec. 17, 2019
Page
243
of 316
Rev 1.01
M
S51
SE
RIES
TE
CHNICA
L REF
ERE
N
CE MA
NU
A
L
necessary to make bit 2 = 1 to exclude slave 2.
The “Broadcast” address for each slave is created by taking the logical OR of SADDR and SADEN.
Zeros in this result are treated as “don’t-cares”, e.g.:
SADDR = 01010110b
SADEN = 11111100b
Broadcast = 1111111Xb
The use of don’t-care bits provides flexibility in defining the Broadcast address, however in most
applications, interpreting the “don’t-cares” as all ones, the broadcast address will be FFH.
On reset, SADDR and SADEN are initialized to 00H. This produces a “Given” address of all “don’t
cares” as well as a “Broadcast” address of all XXXXXXXXb (all “don’t care” bits). This ensures that the
serial port will reply to any address, and so that it is backwards compatible with the standard 80C51
microcontrollers that do not support automatic address recognition.
6.8.6
Control Register of UART
SCON
– Serial Port Control
Regiser
Address
Reset Value
SCON
98H, all pages, Bit addressable
0000_0000b
7
6
5
4
3
2
1
0
SM0/FE
SM1
SM2
REN
TB8
RB8
TI
RI
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Bit
Name
Description
7
SM0/FE
Serial port mode select
SMOD0 (PCON.6) = 0:
See Table 6.8-1 Serial Port UART0 Mode / baudrate Description for details.
SMOD0 (PCON.6) = 1:
SM0/FE bit is used as frame error (FE) status flag. It is cleared by software.
0 = Frame error (FE) did not occur.
1 = Frame error (FE) occurred and detected.
6
SM1
5
SM2
Multiprocessor communication mode enable
The function of this bit is dependent on the serial port 0 mode.
Mode 0:
This bit select the baud rate between FSYS/12 and FSYS/2.
0 = The clock runs at FSYS/12 baud rate. It maintains standard 8051compatibility.
1 = The clock runs at FSYS/2 baud rate for faster serial communication.
Mode 1:
This bit checks valid stop bit.
0 = Reception is always valid no matter the logic level of stop bit.
1 = Reception is valid only when the received stop bit is logic 1 and the received data matches
“Given” or “Broadcast” address.
Mode 2 or 3:
For multiprocessor communication.
0 = Reception is always valid no matter the logic level of the 9th bit.
1 = Reception is valid only when the received 9th bit is logic 1 and the received data matches
“Given” or “Broadcast” address.
4
REN
Receiving enable
0 = Serial port 0 reception Disabled.
1 = Serial port 0 reception Enabled in Mode 1,2, or 3. In Mode 0, reception is initiated by the
condition REN = 1 and RI = 0.