VEML6040
www.vishay.com
Vishay Semiconductors
Rev. 1.6, 21-Nov-16
7
Document Number: 84276
For technical questions, contact: sensorstechsupport@vishay.com
THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT NOTICE. THE PRODUCTS DESCRIBED HEREIN AND THIS DOCUMENT
ARE SUBJECT TO SPECIFIC DISCLAIMERS, SET FORTH AT www.vishay.com/doc?91000
Digital Interface
The VEML6040 contains a CONF register (00h) used for operation control and parameter setup. Measurement results are stored
in four separate registers, one each for red, green, blue, and white respectively (08h to 0Bh). All registers are accessible via I
2
C
communication. Figure 8 shows the basic I
2
C communication with the VEML6040. Each of the registers in the VEML6040 are
16 bit wide, so 16 bit should be written when a write command is sent, and 16 bit should be read when a read command is sent.
The built in I
2
C interface is compatible with I
2
C modes “standard” and “fast”: 100 kHz to 400 kHz
Fig. 8 - Command Protocol Format
Note
• Please note the repeat start condition when data is read from the sensor. A stop condition should not be sent here.
Slave Address and Function Description
VEML6040 uses 10h slave address for 7-bit I
2
C addressing protocol. VEML6040 has 16-bit resolution for each channel (R, G,
B, and W) that provides sensitivity up to 0.0056 lux/step for G, which is advantageous under a low transmittance lens design
(dark lens).
Note
• Slave address is 7-bit addressing protocol
TABLE 1 - SLAVE ADDRESS AND COMMAND CODE DESCRIPTION
SLAVE ADDRESS 0x10
COMMAND
CODE
DATE BYTE
LOW / HIGH
REGISTER
NAME
R / W
BIT
76543210
00h
L CONF R / W 0 IT (2 : 0) 0 TRIG AF SD
H Reserved R / W Reserved
01h to 07h
L Reserved R / W Reserved
H Reserved R / W Reserved
08h
L R_DATA R R_Data (7 : 0)
H R_DATA R R_Data (15 : 8)
09h
L G_DATA R G_Data (7 : 0)
H G_DATA R G_Data (15 : 8)
0Ah
L B_DATA R B_Data (7 : 0)
H B_DATA R B_Data (15 : 8)
0Bh
L W_DATA R W_Data (7 : 0)
H W_DATA R W_Data (15 : 8)
S Slave address
Wr
A Command code A Data byte low A Data byte high A
17 811 1
818
P
11
Send Word ɦġWrite Command to VEML6040
1
Slave address
7
Wr
A Command code A S Slave address
Rd
A Data byte low A
Data byte high A P
11811711818 11
S
Receive Word ɦġRead Data from VEML6040
S = start condition
P = stop condition
A = acknowledge
Shaded area = VEML6040 acknowledge