
AMIS–749803: (I
2
C) Ambient Light Sensor
Data Sheet
Figure 12 shows a I
2
C read command sent by the master to the slave device. I
2
C read command begins with a start condition. After the
start condition seven bits of address are sent by the master MSB first. After the address bits, RD/WR_ command bit is sent. For a read
command the RD/WR_ bits is high. Upon receiving the address bits and RD/WR_ command bits the device responds with an ACK.
After sending an ACK, the device sends eight bits of data MSB first. After receiving the data master terminates this transaction by
issuing a NACK command to indicate that the master only wanted to read one byte from the device. The master generates a stop
condition to end this transaction.
Figure 12: I
2
C Read Command
8.1 Programmer’s Model
Ambient light intensity count is obtained from this chip by issuing a fixed sequence of I
2
C commands. Integration time of this device is
programmable by writing different values to the integration time register. Sections below describe what a programmer needs to know
about issuing commands to the chip and register access.
8.2 Integration Time Register
Table 5 describes integration time register. This register has three bits, EC[2:0]. Duration of integration time is controlled by these three
bits.
Table 5: Integration Time Register
EC[2]
EC[1]
EC[0]
Operation
Integration Time
0
0
0
Normal mode of operation
0
0
1
Normal mode of operation
200ms (Default)
0
1
0
Normal mode of operation
0
1
1
Test mode
16.7ms
1
0
0
Simulation test mode use only
1
0
1
Reserved for future use
1
1
0
Reserved for future use
1
1
1
Reserved for future use
400ms
100ms
1.0ms
8.3 Programming Sequence and Command Summary
This section describes supported commands and programming sequence. This device only supports single byte write and a single byte
read I
C commands. Ambient light intensity count is a sixteen bits wide number. So to read the sixteen bits wide
count, two I
C read
commands are needed. Table 6 describes commands that this device supports. All of these commands have to be sent to a fixed
address (0x39).
9
AMI Semiconductor
– July 2006, M-20599-001
www.amis.com