
Rev. 1.00
�08 of ���
�an�a�� 1�� �01�
Standard 8051 8-Bit Flash MCU
HT85F2260/HT85F2270/HT85F2280
UART Serial Interfaces – UART0 and UART1
UART0 Multiprocessor Communication
As UART0 can receive 9 bits in Modes 2 and 3, it can be used for multiprocessor communication.
When the SM20 bit in the S0CON register is set, the received interrupt is generated only when the
9th received bit, the RB80 bit in the S0CON register, is high. Otherwise, no interrupt is generated
upon reception.
To utilise this feature for multiprocessor communication, the slave processors have their SM20 bit
set high. The master processor transmits the slave’s address, with the 9th bit set high, generating a
reception interrupt in all of the slaves. The slave processors’ software compares the received byte
with their network address. If there is a match, the addressed slave clears its SM20 flag and the rest
of the message is transmitted from the master with the 9th bit cleared to zero. The other slaves keep
their SM20 set high so that they ignore the rest of the message sent by the master. In this way, there
are reduced program overheads to distinguish the target slave MCU.
UART0 Baud Rate Setup
The UART0 operating Modes1 and 3, have a variable baud rate setup using the UART0 Baud rate
generator. The clock source can be selected to be either the Timer 1 overflow or the system clock,
decided by the BD bit in the SBRCON register. The baud rate generator can be controlled by the
S0RELH and S0RELL registers and the clock is the output of the prescaler, defined by the S0PRE0
and S0PRE1 bits. Operating Mode 0 has a fixed baud rate of f
SYS
/12 and operating Mode 2, has two
baud rates, SP0CLK/64 and SP0CLK/32, selected by the SMOD bit in the PCON register.
f
SYS
10-bit Time�
S0RELH[1:0] S0RELL[7:0]
Time� 1
Ove�flow
SMOD
UART0
Ba�d Rate
SP0CLK
P
�escale
�
f
SYS
/4
f
SYS
f
SYS
/6
f
SYS
/1�
S0PRE0
S0PRE1
M
U
X
/
BD
/
MUX
MUX
f
SYS
/1�
SM[1:0]
01� 11
00
10
0
1
SMOD
Va�iable
÷� SP0CLK/�
÷�
÷�
÷16
÷16
SP0CLK/64
o�
SP0CLK/3�
UART0 Baud Rate Generator
The Variable baud rate, which is provided for Mode 1 and Mode 3, can be derived using the
following two equations, depending upon the BD bit condition.
BD=0 – Timer1 overflow clock source.
)
_
_
1
(
*
32
2
_
Rate
Overflow
Timer
Rate
Baud
SMOD
=
BD=1 – Register select clock Source.
)
0
_
_
(
*
])
0
:
9
[
0
2
(
*
64
2
_
10
CLK
SP
of
Freq
REL
S
Rate
Baud
SMOD
−
=