infd.
8XC52/54/58 HARDWARE DESCRIPTION
TIMER1 OVERFLOW
1
=&Os::Q::”B:NOT
.
.fl~., %dRCJL
----- --- RCLK Rx
d
TR2
T2 PIN
TRANSmON
DETECTION
+X1 ;+
T2EX PIN
[ CONTROL
EXEN2
2707SS-4
—. — —
Fi9ure 5. Timer 2 in BaudRateGenerator Mode
A way to use this featurein multiprocessor systems is
asfollows:
When the masterprocessorwantato transmit a block of
&ta to one of several slaves, it ftrst sends out an ad-
dreaabyte which identities the targetslave. Remember,
an address byte has its 9th bit set to 1, whereas a data
byte has its 9th bit set to O.AU the slave processors
should have their SM2 bits set to 1 so they will only be
interruptedby an addreasbyte. The Automatic Address
Recognition feature allows only the addressed slave to
be interrupted. In this modej the addreaacomparison
occurs in hardware,not software. (On the 80C51 aerial
port, an addressbyte interruptsall slaves for an address
comparison).
The addressed slave then clears its SM2 bit and pr~
paresto receive the data byteathat will be coming. The
other slaves are unaffectedby these data bytea as they
are still waiting to receivean address byte.
The feature works the same way in
the 8-bit mode
(Mode 1) as in the 9-bit modes, except that the stop bit
takes the place of the 9th data bit. If SM2 is @ the RI
flag is set only if the receivedbyte matches the Given or
Broadeast Address and is terminated by a valid stop
bit. Setting the SM2 bit has no effect on Mode O.
The master can selectivelycommunicate with groupsof
slavea by using the Given Address. Addressing all
slaves at once is possible with the Broadcast Address.
These addressesare defined for each slave by two Spe-
eial Function Registers:SADDR and SADEN.
A slave’s individual addreasis specifkd in SADDR.
SADEN is a mask byte that defines don’t-carebits to
form the Given Addreas.These don’t-caresallow flexi-
bility in the user-defined protocol to address one or
more slavea at a time. The following is an example of
how the user ecndddefine Given Addresses to selective-
ly address ditYerentslavea.
Slave
1:
SADDR
.
11110001
SADEN
.
11111010
GIVEN
.
1111oxox
Steve2:
SADDR
.
11110011
SADEN
.
11111001
GIVEN
—
—
1111 Oxxl
The
SADENbitsareselectedsuchthateachslavecan
be addressed
separately. Notice that bit O (LSB) is a
don’t-care for Slave 1’sGiven Address, but bit O = 1
for Slave 2. Thus, to selectivelycomtnunieate with just
Slave 1thetnaster must send an addresswith bit O = O
(e.g., 1111OOIM).
Similarly, bit 1 = Ofor Slave 1, but is a don’t-carefor
Slave 2. Now to communicate with just Slave 2 an ad-
dreaawith bit 1 = 1 must be used (e.g., 11110111).
4-1o