VCNL4000
www.vishay.com
Vishay Semiconductors
Rev. 1.8, 10-May-12
6
Document Number: 83798
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
2. I
2
C Interface
The VCNL4000 contains twelve 8 bit registers for operation control, parameter setup and result buffering. All registers are
accessible via I
2
C communication. Figure 13 shows the basic I
2
C communication with VCNL4000.
The built in I
2
C interface is compatible with all I
2
C modes (standard, fast and high speed).
I
2
C H-level range = 1.7 V to 5 V.
Please refer to the I
2
C specification from NXP for details.
Fig. 13 - Send Byte/Receive Byte Protocol
Device Address
The VCNL4000 has a fix slave address for the host
programming and accessing selection. The predefined 7 bit
I
2
C bus address is set to 0010 011 = 13h. The least
significant bit (LSB) defines read or write mode. Accordingly
the bus address is set to 0010 011x = 26h for write, 27h for
read.
Register Addresses
VCNL4000 has twelve user accessible 8 bit registers. The
register addresses are 80h (register #0) to 8Bh (register #11).
REGISTER FUNCTIONS
Register #0 Command Register
Register address = 80h
The register #0 is for starting ambient light or proximity measurements. This register contains 2 flag bits for data ready indication.
Notes
• After a proximity start command [prox_od] a WAIT time of ≥ 400 μs should be inserted before any read out commands.
• With setting bit 3 and bit 4 at the same write command, a simultaneously measurement of ambient light and proximity is done.
S
Slave address
Rd
Receive byte Read data from VCNL4000
A
Register address
A
Wr
P
S
Slave address
PA
A
Data byte
Send byte Write command to VCNL4000
S = start condition
P = stop condition
A = acknowledge
Host action
VCNL4000 response
S
Slave address
A Register address
A
Wr
P
Data byte
A
22313
TABLE 1 - COMMAND REGISTER #0
Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
config_lock als_data_rdy prox_data_rdy als_od prox_od N/A N/A N/A
Description
config_lock Read only bit. Value = 1
als_data_rdy
Read only bit. Value = 1 when ambient light measurement data is available in the result registers. This bit
will be reset when one of the corresponding result registers (reg #5, reg #6) is read.
prox_data_rdy
Read only bit. Value = 1 when proximity measurement data is available in the result registers. This bit will
be reset when one of the corresponding result registers (reg #7, reg #8) is read.
als_od
R/W bit. Starts a single on-demand measurement for ambient light. If averaging is enabled, starts a
sequence of readings and stores the averaged result. Result is available at the end of conversion for
reading in the registers #5(HB) and #6(LB).
prox_od
R/W bit. Starts a single on-demand measurement for proximity.
Result is available at the end of conversion for reading in the registers #7(HB) and #8(LB).