TSL2571
LIGHT-TO-DIGITAL CONVERTER
TAOS117A − FEBRUARY 2011
I2C Protocol
2
Interface and control are accomplished through an I C serial compatible interface (standard or fast mode) to
a set of registers that provide access to device control functions and output data. The devices support the 7-bit
2
I C addressing protocol.
2
The I C standard provides for three types of bus transaction: read, write, and a combined protocol (Figure 17).
During a write operation, the first byte written is a command byte followed by data. In a combined protocol, the
first byte written is the command byte followed by reading a series of bytes. If a read command is issued, the
register address from the previous command will be used for data access. Likewise, if the MSB of the command
is not set, the device will write a series of bytes at the address stored in the last valid command with a register
address. The command byte contains either control information or a 5-bit register address. The control
commands can also be used to clear interrupts.
2
2
The I C bus protocol was developed by Philips (now NXP). For a complete description of the I C protocol, please
2
review the NXP I C design specification at http://www.i2c−bus.org/references/.
A
N
P
R
S
S
W
Acknowledge (0)
Not Acknowledged (1)
Stop Condition
Read (1)
Start Condition
Repeated Start Condition
Write (0)
... Continuation of protocol
Master-to-Slave
Slave-to-Master
1
7
1
1
8
1
8
1
1
...
...
S
Slave Address
W
A
Command Code
A
Data Byte
A
P
2
I C Write Protocol
1
7
1
1
8
1
8
1
1
S
Slave Address
R
A
Data
A
Data
A
P
2
I C Read Protocol
1
7
1
1
8
1
1
7
1
1
S
Slave Address
W
A
Command Code
A
S
Slave Address
R
A
8
1
8
1
1
...
Data
A
Data
A
P
2
I C Read Protocol — Combined Format
2
Figure 9. I C Protocols
Copyright E 2011, TAOS Inc.
The LUMENOLOGY r Company
r
r
www.taosinc.com
11