User Manual

47
T89C51AC2
Rev. B 19-Dec-01
more slaves at a time. The fol lowing ex ample il lustrates how a given address is formed.
To address a dev ice by its individual address, the SADEN mask by te must be 1111
1111b.
For example:
SADDR0101 0110b
SADEN
1111 1100b
Given0101 01XXb
Here is an ex ample of how to use given addresses to addre ss different slaves:
Slave A:SADDR1111 0001b
SADEN
1111 1010b
Given1111 0X0Xb
Slave B:SADDR1111 0011b
SADEN
1111 1001b
Given1111 0XX1b
Slave C:SADDR1111 0010b
SADEN
1111 1101b
Given1111 00X1b
The SADEN byte is selected so that eac h slave may be addressed separat ely.
For slave A , bit 0 (t he LSB) is a don’t-car e bit; for s laves B and C, bit 0 is a 1. To com-
municate with slave A only, the master must send an address where bit 0 is clear (e.g.
1111 0000b).
For slave A , bit 1 is a 0; for sla ve s B and C, bit 1 is a don’t c are bit. To communicate with
slave s A and B, but not s lave C, the master must send an address with bits 0 and 1 both
set (e.g. 1111 0011b).
To comm unicat e with s laves A, B and C, the master must send an address with bit 0 set,
bit 1 clear, and bit 2 clear (e.g. 1111 0001b).
11.4 Broadcast Address A broadcast address is form ed from the logical OR of t he SADDR and SADEN registers
with zeros defined as don’t-care bits, e.g .:
SADDR 0101 0110b
SADEN 1111 1100b
SADDR OR SADEN1111 111Xb
The use of don’t-care bits p rovides flexibility in definin g t he broadcast addre ss, however
in most applications, a broadcas t address is FFh. T he following is an example of using
broadc ast addresses :
Slave A:SADDR1111 0001b
SADEN
1111 1010b
Given1111 1X11b,
Slave B:SADDR1111 0011b
SADEN
1111 1001b
Given1111 1X11B,
Slave C:SADDR=1111 0010b
SADEN
1111 1101b
Given1111 1111b
For slaves A and B, bit 2 is a don’t care bit; for slave C, bit 2 is set. To comm unicat e with
all of the slaves, the master must s end an address FFh. To communicat e with slaves A
and B , but not slave C , the master can send and address FB h.