Datasheet

35
MSL2021 [DATASHEET]
42062A–LED–02/2013
acknowledges. The pointer auto-increments during each master initiated acknowledge period. End the transmission with
a not-acknowledge followed by a stop condition.
Figure 14-9. I
2
C Reading Register Data with Preset Register Pointer
The second read technique is illustrated in Figure 14-10. Write to the MSL2021 to set the register pointer, send a
repeated START condition after the second acknowledge bit, then send the slave address again with the R/W bit set to 1
to indicate a read. Then clock out the data bytes separated by master initiated acknowledge bits. The register pointer
auto-increments during each master initiated acknowledge period. End the transmission with a not-acknowledge
followed by a stop condition. This technique is recommended for buses with multiple masters, because the read
sequence is performed in one uninterruptible transaction.
Figure 14-10. I
2
C Reading Register Data Using a Repeated START
14.8 I
2
C Message Format for Broadcast Writing to Multiple devices
With a broadcast write to MSL2021, a master broadcasts the same register data to all MSL2021s on the bus. First send
the broadcast write slave address of 0x00, followed by the MSL2021 broadcast device ID of 0x42. These two bytes are
followed by the register address in the MSL2021s that the following data are to be written into, and finally the data byte(s)
to be written into all devices.
A broadcast write example is shown in Figure 14-11. Here, the same register address in every MSL2021 is written to with
identical data. If further data bytes are transmitted before the STOP condition, they are stored in subsequent internal
registers of each MSL2021.
SDA
0 1 0 00001 A D7 D0 A D0 A
ACKNOWLEDGE
FROM MSL202x
START STOP
SLAVE ADDRESS,
READ ACCESS
READ REGISTER
ADDRESS X
READ REGISTER
ADDRESS X + 1
D7
......
THE REGISTER POINTER NOW POINTS TO X + 2; A SUBSEQUENT
READ ACCESS READS FROM REGISTER ADDRESS X + 2
NOT ACKNOWLEDGE
FROM MASTER
......
ACKNOWLEDGE
FROM MASTER
SDA
0 1 0 00000 A
REPEATED
START
D0 A 1 1 00001 A D0 A
ACKNOWLEDGE
FROM MSL202x
0
START STOP
SLAVE ADDRESS
WRITE ACCESS
SLAVE ADDRESS
READ ACCESS
READ REGISTERS
D7
ACKNOWLEDGE
FROM MSL202x
ACKNOWLEDGE
FROM MSL202x
NOT ACKNOWLEDGE
FROM MASTER
......
D7
......
SET REGISTER
POINTER