Obsolete
Product(s)
- Obsolete
Product(s)
UPSD3254A, UPSD3254BV, UPSD3253B, UPSD3253BV
Standard serial interface (UART)
be activated only if RB8 = 1. This feature is enabled by setting Bit SM2 in SCON. A way to
use this feature in multi-processor systems is as follows:
When the master processor wants to transmit a block of data to one of several slaves, it first
sends out an address byte which identifies the target slave. An address byte differs from a
data byte in that the 9th bit is '1' in an address byte and 0 in a data byte. With SM2 = 1, no
slave will be interrupted by a data byte. An ad-dress byte, however, will interrupt all slaves,
so that each slave can examine the received byte and see if it is being addressed. The
addressed slave will clear its SM2 bit and prepare to receive the data bytes that will be
coming. The slaves that weren’t being addressed leave their SM2s set and go on about their
business, ignoring the coming data bytes.
SM2 has no effect in Mode 0, and in Mode 1 can be used to check the validity of the Stop
bit. In a Mode 1 reception, if SM2 = 1, the receive interrupt will not be activated unless a
valid Stop bit is received.
12.2
Serial port control register
The serial port control and status register is the Special Function Register SCON (SCON2
for the second port), shown in
Figure 26. This register 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).
Table 43.
Serial port control register (SCON)
76
543
21
0
SM0
SM1
SM2
REN
TB8
RB8
TI
RI
Table 44.
Description of the SCON bits
Bit
Symbol
Function
7
SM0
(SM1,SM0)=(0,0): Shift Register. Baud rate = fOSC/12
(SM1,SM0)=(1,0): 8-bit UART. Baud rate = variable
(SM1,SM0)=(0,1): 8-bit UART. Baud rate = fOSC/64 or fOSC/32
(SM1,SM0)=(1,1): 8-bit UART. Baud rate = variable
6SM1
5SM2
Enables the multiprocessor communication features in Mode 2 and 3. In
Mode 2 or 3, if SM2 is set to '1,' RI will not be activated if its received 8th
data bit (RB8) is '0.' In Mode 1, if SM2=1, RI will not be activated if a valid
Stop bit was not received. In Mode 0, SM2 should be '0'
4REN
Enables serial reception. Set by software to enable reception. Clear by
software to disable reception
3TB8
The 8th data bit that will be transmitted in Modes 2 and 3. Set or clear by
software as desired
2RB8
In Modes 2 and 3, this bit contains the 8th data bit that was received. In
Mode 1, if SM2=0, RB8 is the Snap Bit that was received. In Mode 0, RB8
is not used