Datasheet

Industry’s Lowest-Power
Ambient Light Sensor with ADC
Figure 4. START, STOP, and Repeated START Conditions Figure 5. Acknowledge
Table 10. Slave Address
Slave Address
The slave address is controlled by the A0 pin. Connect
A0 to either ground or V
CC
to set the address. Table 10
shows the two possible addresses for the IC.
Acknowledge
The acknowledge bit (ACK) is a clocked 9th bit that the
IC uses to handshake receipt each byte of data when in
write mode (see Figure 5). The IC pulls down SDA dur-
ing the entire master-generated ninth clock pulse if the
previous byte is successfully received. Monitoring ACK
allows for detection of unsuccessful data transfers. An
unsuccessful data transfer occurs if a receiving device
is busy or if a system fault has occurred. In the event of
an unsuccessful data transfer, the bus master can retry
communication. The master pulls down SDA during the
ninth clock cycle to acknowledge receipt of data when
the IC is in read mode. An acknowledge is sent by the
master after each read byte to allow data transfer to
continue. A not acknowledge is sent when the master
reads the final byte of data from the IC, followed by a
STOP condition.
Write Data Format
A write to the IC includes transmission of a START condi-
tion, the slave address with the R/W bit set to 0, 1 byte
of data to configure the internal register address pointer,
1 or more bytes of data, and a STOP condition. Figure
6 illustrates the proper frame format for writing 1 byte of
data to the IC.
The slave address with the R/W bit set to 0 indicates
that the master intends to write data to the IC. The IC
acknowledges receipt of the address byte during the
master-generated ninth SCL pulse.
The second byte transmitted from the master configures
the IC’s internal register address pointer. The pointer
tells the IC where to write the next byte of data. An
acknowledge pulse is sent by the IC upon receipt of the
address pointer data.
The third byte sent to the IC contains the data that is writ-
ten to the chosen register. The master signals the end of
transmission by issuing a STOP condition.
Read Data Format
To read a byte of data, the register pointer must first be
set through a write operation (Figure 7). Send the slave
address with the R/W set to 0, followed by the address
of the register that needs to be read. After a Repeated
START condition, send the slave address with the R/W
bit set to 1 to initiate a read operation. The IC then sends
an acknowledge pulse followed by the contents of the
register to be read. Transmitted data is valid on the rising
edge of the master-generated serial clock (SCL).
Figure 8 illustrates the frame format for reading two reg-
isters consecutively without a STOP condition in between
reads. This applies to reading the Lux Data registers
0x03 and 0x04 consecutively only.
Sensor Position
The photo sensitive area of the IC is 0.37mm x 0.37mm
and much smaller than the device itself. When placing
the part behind a light guide, only this sensitive area has
to be taken into account. Figure 9 shows the position and
size of the photo-sensitive area within the package.
SCL
SDA
S SR P
1
SCL
START
CONDITION
SDA
2 8 9
CLOCK PULSE FOR
ACKNOWLEDGMENT
ACKNOWLEDGE
NOT ACKNOWLEDGE
A0
SLAVE ADDRESS
FOR WRITING
SLAVE ADDRESS
FOR READING
GND 1001 0100 1001 0101
V
CC
1001 0110 1001 0111
16
Maxim Integrated
MAX44009