GP2AP054A00F

GP2AP054A00F
<Appendix>
GP2AP054A00F
Table of contents
1. Abstract
1.1. Features.....
...
...
...
....
...
...
...
...
...
...
..
....
...
...
...
...
...
...
..
....
...
...
.Attachment-3
1.2. I2C bus interface......
.
....
...
...
...
...
...
...
..
....
...
...
...
...
...
...
..
....
...
...
.Attachment-4
1.2.1. Write Format.............................................................Attachment-4
1.2.2. Read Format.............................................................Attachment-4
1.2.3. Others and Notes.........................................................Attachment-4
2. Recommended operating mode/Procedure of register setting
2.1. GS mode......
...
...
.
....
...
...
...
...
...
...
..
....
...
...
...
...
...
...
..
....
...
...
.Attachment-5
2.2. PS mode......
...
...
.
....
...
...
...
...
...
...
..
....
...
...
...
...
...
...
..
....
...
...
.Attachment-6
2.3. ALS mode.....
...
...
.
....
...
...
...
...
...
...
..
....
...
...
...
...
...
...
..
....
...
...
.Attachment-7
2.4. GS and ALS alternating mode.....
...
...
...
...
...
....
...
...
...
...
...
...
..
....
...
...
.Attachment-8
2.5. PS and ALS alternating mode.....
...
...
...
...
...
....
...
...
...
...
...
...
..
....
...
...
.Attachment-9
2.6. Shutdown mode......
.
....
...
...
...
...
...
...
..
....
...
...
...
...
...
...
..
....
...
...
.Attachment-9
3. INT terminal output mode
3.1. Detection result output mode for PS..
...
...
...
...
.
....
...
...
...
...
...
...
..
....
...
..
.Attachment-10
3.2. Interrupt output mode...
....
...
...
...
...
...
...
..
....
...
...
...
...
...
...
..
....
...
..
.Attachment-11
4. Register Mapping
4.1. Register Mapping......
....
...
...
...
...
...
...
..
....
...
...
...
...
...
...
..
....
...
..
.Attachment-12
4.2. Precautions for Register setting........
...
...
...
..
....
...
...
...
...
...
...
..
....
...
..
.Attachment-13
4.3. Register Functions.....
....
...
...
...
...
...
...
..
....
...
...
...
...
...
...
..
....
...
..
.Attachment-13
5. Register settings for Basic operation
5.1. Operating mode selection
5.2. Proximity detection/non-detection sensing result
5.3. Interrupt result
5.4. INT terminal setting
5.5. Interrupt type setting
5.6. Software reset
5.7. Device ID
:OP[3],OP[1:0]............
....Attachment-14
:PROX......................Attachment-14
:FLAG_P,FLAG_A,FLAG_G....Attachment-14
:PIN[2:0]....................Attachment-14
:INTTYPE[2:0]...............Attachment-14
:RST........................Attachment-14
:ID[7:0]....
....
....
...
..
....
.Attachment-14
6. Register settings for ALS
6.1. Resolution/Measuring duration setting for ALS mode
6.2. Maximum measurable range for ALS mode
6.3. ALS Detection result
:RES_A[1:0]........
...
..
....
.Attachment-15
:RANGE_A[3:0]..............Attachment-15
:D5[15:0],D6[15:0]............Attachment-15
7. Register settings for GS and PS
7.1. Number of measurement cycles setting
7.2. Resolution/Measuring duration setting for PS mode
7.3. Maximum measurable range
7.4. LED drive peak current setting
7.5. LED pulse setting
7.6. Gesture and Proximity low threshold (Loff)
7.7. Gesture and Proximity high threshold (Lon)
7.8. Gesture offset (Offset)
7.9. GS/PS Detection result
7.10. Saturation Detection result of the integrator
7.11. PANEL count subtraction
7.12. Intermittent operating function
:PRST[2:0]...................Attachment-16
:RES_P[1:0]..................Attachment-16
:RANGE_P[2:0]...........
....Attachment-16
:IS[2:0]......................Attachment-17
:SUM[2:0]...................Attachment-17
:PL[15:0]....................Attachment-17
:PH[15:0]....................Attachment-17
:OS_Dx[13:0]..........
...
....Attachment-17
:D0-3[13:0],D4[15:0].......
....Attachment-18
:SATx.......................Attachment-18
:PANEL[5:0].................Attachment-18
:INTVAL_P[2:0]..............Attachment-19
Sheet No.: OP14043EN
Attachment-1
GP2AP054A00F
8. Average consumption current
8.1. Average consumption current with Vcc terminal......
....
...
...
...
...
...
...
..
....
...
..
.Attachment-20
8.2. Average consumption current with VLED terminal........
...
...
...
...
...
...
..
....
...
..
.Attachment-20
9. Example of setting sequence
9.1. From Power-On to operating mode........
...
...
..
....
...
...
...
...
...
...
..
....
...
..
.Attachment-21
9.2. From operating mode to Power-Off........
...
...
..
....
...
...
...
...
...
...
..
....
...
..
.Attachment-21
9.3. Power-On and Power-Off....
...
...
...
...
...
...
..
....
...
...
...
...
...
...
..
....
...
..
.Attachment-21
10. Device driver
10.1. Device driver....
...
.
....
...
...
...
...
...
...
..
....
...
...
...
...
...
...
..
....
...
..
.Attachment-22
11. Recommended Window Size (Reference)
11.1. Without light shield...
....
...
...
...
...
...
...
..
....
...
...
...
...
...
...
..
....
...
..
.Attachment-22
12. Data (Reference)
12.1. LED drive peak current....
...
...
...
...
...
...
..
....
...
...
...
...
...
...
..
....
...
..
.Attachment-23
12.1.1. LED drive peak current vs. VLED (Vcc=VLED)...
...
...
...
...
...
...
..
....
...
..
.Attachment-23
12.1.2. LED drive peak current vs. Vcc (VLED=3V)......
...
...
...
...
...
...
..
....
...
..
.Attachment-23
12.2. Spectral Responsivity......
...
...
...
...
...
...
..
....
...
...
...
...
...
...
..
....
...
..
.Attachment-24
12.3. Proximity sensor (PS) mode..
...
...
...
...
...
...
.
....
...
...
...
...
...
...
..
....
...
..
.Attachment-24
12.4. Angular dependence...
....
...
...
...
...
...
...
..
....
...
...
...
...
...
...
..
....
...
..
.Attachment-25
Sheet No.: OP14043EN
Attachment-2
GP2AP054A00F
1. Abstract
GP2AP054A00F is ambient light sensor and gesture sensor/proximity sensor with function ambient light
sensing and gesture sensing/proximity sensing by setting register.
Proximity sensor (PS) mode: Judgment result of object existence can be referred by reading register value
(14bit) via I2C bus interface. INT terminal can be changed either interrupt output or sensing result output
(detection/non-detection status) by setting register in PS mode.
Ambient light sensor (ALS) mode: Detection result of ambient light can be referred by reading register value
(16bit) via I2C bus interface. INT terminal can be changed interrupt output by setting register in PS mode.
This product is possible to operate both PS and ALS modes alternately.
Gesture sensor (GS)
mode
PS and ALS
alternating mode
Software-shutdown
mode
GS and ALS
alternating mode
Proximity sensor (PS)
mode
Ambient light
sensor (ALS) mode
Fig.1 Operating mode of GP2AP054A00F (GS and ALS sensor)
1.1. Features
● Design
This product is composed of following two chips in one package, which is IC with a built-in
photodiode (PD) (Clear (visible and infrared) photodiode and Infrared photodiode) for ambient light
sensors and gesture sensors/proximity sensors, and infrared LED.
Achieving Small all-in-one package by Doubly-integrally-molded, transparent resin and light shield resin.
Spectral sensitivity (ALS) of the human eye without infrared light effects can be obtain by deducting
Infrared Photodiode from Clear photodiode.
● I2C bus interface
This product has 7bit slave address adherence to I2C bus interface and can change register value for
each function via I2C bus.
● INT terminal setting
INT terminal can be changed either interrupt output or sensing result output (detection/non-detection status)
by setting register in PS mode. ALS mode has only interrupt output setting.
● Power save mode
Software-shutdown/Hardware-shutdown
Sheet No.: OP14043EN
Attachment-3
GP2AP054A00F
1.2. I2C bus interface
This product has 7bit slave address adherence to I2C bus interface and can change register value for each
function via I2C bus. Besides, illuminance detection result and judgment result for detection/non-detection
status can be read via I2C bus.
Table 1. Terminals for I2C bus interface are as follows.
Pin Name
Description
SCL
I2C Clock
2
SDA
I C Data bus
Basic data format are as follows.
S
T M
A S
R B
T
SDA
DATA
DATA
SLAVE ADDRESS
L
S
B
R A
/ C
W K
A6 A5 A4 A3 A2 A1 A0
A M
C S
K B
D7 D6 D5 D4
D3
D2
D1
D0
L
S
B
S
A
T
C
O
K
P
D7 D6 D5 D4 D3 D2 D1 D0
Fig.2 I2C Basic data format
DATA : Data which write into internal register/read from internal register.
SLAVE ADDRESS :
Table 2. I2C slave address
ADDRESS
A6
A5
A4
A3
A2
0
1
1
1
0
R/W : Read:X=1, Write:X=0
A1
0
A0
1
R/W
X
1.2.1. Write Format
Write value in register and enable to write the next address sequentially after writing data. Data writing
will be end with inputting stop-condition.
WordAddress : 01H PROX, FLAG_P,FLAG_A and FLAG_G register in 01H are read only.
WordAddress : 14H ~ 39H D0 ~ D6 registers from 14H to 39H are read only.
Bit width
S
7
Slave Address
1
0 A
8
Word Address
A
8
Write Data1
A
8
Write Data2
A P
A: ACK,NA: NACK, S: ST ART , P: ST OP, X: don't care
: Master output
: Slave output
Fig.3 I2C write format
1.2.2. Read Format
Enable to read data in register. Following address can be read sequentially by inputting ACK after reading data.
Reading data will be stopped by inputting NACK.
Stop-condition after setting Word address can be deleted since it corresponds to repeat-start-condition.
Reading read data is done by not opening I2C bus interface.
Bit width.
7
S Slave Address
1
0 A
8
WordAddress
A (P) S
7
Slave Address
1
1 A
8
ReadData1
A
8
ReadData2
NA P
A: ACK, NA: NACK, S: ST ART , P: ST OP, X: don't care
: Master output
: Slave output
Fig.4 I2C read format
1.2.3. Others and Notes
This product doesn’t support Clock-stretch function and General-call-address function.
Sheet No.: OP14043EN
Attachment-4
GP2AP054A00F
2. Recommended operating mode/Procedure of register setting
When the GS mode, PS mode and ALS mode switch, please shut down and switched again.
Software-shutdown
mode
Gesture sensor (GS)
mode
PS and ALS
alternating mode
GS and ALS
alternating mode
Proximity sensor (PS)
mode
Ambient light
sensor (ALS) mode
Fig.5 Recommended operating mode
2.1. Gesture sensor (GS) mode
The device can detect proximity objects by which integrates incident light in IR (infrared) photodiode
during the time without emission of LED (LED off) and the time with emission of LED (LED on)
in order to eliminate the influence of ambient light.
Below is an example of GS mode (Average consumption current is typical 2.1mA.),
Table 3. Example of setting for GS mode
Register value
ADDR
Register setting
Example
bite
Hex
OP[3]=1
Active
00h
1010_0000
A0h
OP[1:0]=10
GS mode
01h
PIN[2:0]=100
GS Interrupt
02h
0100_1110
4Eh
INTTYPE[2:0]=111
Pulse interrupt
03h
04h
0000_0001
01h
PRST[2 :0]=011
PRST 4cycle
05h
0110_1001
69h
RES_P[1 :0]=01
12bit
RANGE_P[2 :0]=001
x2 range
IS[2 :0]=110
IS=150mA
06h
1100_1101
CDh
SUM[2 :0]=011
LED Pulse x16
07h
1111_1010
FAh
INTVAL_P[2 :0]=010
Interval time7.7msec
0Ch
0000_0000
00h
OS_D0[13 :0]=d 00
0Dh
0000_0000
00h
0Eh
0000_0000
00h
OS_D1[13 :0]=d 00
0Fh
0000_0000
00h
10h
0000_0000
00h
OS_D2[13 :0]=d 00
11h
0000_0000
00h
12h
0000_0000
00h
OS_D3[13 :0]=d 00
13h
0000_0000
00h
41h
0000_0000
00h
Gesture sensing results can be read at D0[13:0],D1[13:0],D2[13:0],D3[13:0],and D4[15:0] register
through I2Cbus interface. The device outputs raw data of the four IR photodiodes sensitive to only
infrared spectrum gesture sensing. It is necessary for device host (user side) to get detection results
with calculation of gesture values for each channel data at D0[13:0],D1[13:0],D2[13:0],D3[13:0]
and total value of each channel data at D4[15:0].
Sheet No.: OP14043EN
Attachment-5
GP2AP054A00F
Gesture sensor mode
GS
INT VAL
D0-3[13:0]
Gesture
result
Gesture
result
proximity
result
infrared
result
D4[15:0]
GS
INT VAL
GS
Fig.6 Output results for GS mode
2.2. Proximity sensor (PS) mode
The device can detect proximity objects by which integrates incident light in IR (infrared) photodiode
during the time without emission of LED (LED off) and the time with emission of LED (LED on)
in order to eliminate the influence of ambient light.
Below is an example of PS mode (Average consumption current is typical 0.8mA.)
Table 4. Example of setting for PS mode
Register value
ADDR
Register setting
Example
bite
Hex
OP[3]=1
Active
00h
1010_0000
A0h
OP[1:0]=10
GS mode
01h
PIN[2:0]=001
PS Interrupt
02h
0001_1110
1Eh
INTTYPE[2:0]=111
Pulse interrupt
03h
04h
0000_0001
01h
PRST[2 :0]=011
PRST 4cycle
05h
0110_1001
69h
RES_P[1 :0]=01
12bit
RANGE_P[2 :0]=001
x2 range
IS[2 :0]=110
IS=150mA
06h
1100_1101
CDh
SUM[2 :0]=011
LED Pulse x16
07h
1111_1011
FBh
INTVAL_P[2 :0]=011
Interval time 30msec
08h
1110_1000
E8h
PL[15 :0]=d 1000
Loff=115mm
09h
0000_0011
03h
0Ah
1101_1100
DCh
PH[15 :0]=d 1500
Lon=100mm
0Bh
0000_0101
05h
0Ch
0000_0000
00h
OS_D0[13 :0]=d 00
0Dh
0000_0000
00h
0Eh
0000_0000
00h
OS_D1[13 :0]=d 00
0Fh
0000_0000
00h
10h
0000_0000
00h
OS_D2[13 :0]=d 00
11h
0000_0000
00h
12h
0000_0000
00h
OS_D3[13 :0]=d 00
13h
0000_0000
00h
41h
0000_0000
00h
Proximity sensing result can be read at D4[15:0] register through I 2Cbus interface.
The device outputs interrupt signal or detection/non-detection status on INT terminal in which case
D4[15:0] exceed/fall below judgment threshold level(PH[15:0]/PL[15:0]) set before sensing operation.
Sheet No.: OP14043EN
Attachment-6
GP2AP054A00F
2.3. Ambient light sensor (ALS) mode
There are 2 photodiodes, CLEAR (sensitive to visible and infrared spectrum) and IR photodiodes
(sensitive to only infrared spectrum) in this sensor. Illuminance value can be obtained by calculation
from CLEAR and IR data.
Below is an example of ALS mode. (Average consumption current is typical 0.1mA.)
Table 5. Example of setting for ALS mode
Register value
ADDR
Register setting
Example
bite
Hex
OP[3]=b’1
Active
00h
1001_0000
90h
OP[1:0]=b’01
ALS mode
01h
02h
0100_1000
48h
RES_A[1 :0]=01
16bit
RANGE_A[3
:0]=
03h
⇔
⇔
x1⇔x512range
0xxx_x000⇔1xxx_x111
1100_1111
CFh
04h
0000_0001
01h
41h
0000_0000
00h
*1 The range (×1 or ×512) is switched according to the D5 data.
Low_lux_mode:×1,High_lux_mode:×512
Maximum detectable
range (ALS)*1
Ambient light sensing results can be read at D5[15:0] and D6[15:0] register through I 2C bus interface.
The device continues to execute integration operation until set measuring time (30msec, recommended) passes.
The device outputs raw data of CLEAR photodiode sensitive to both visible and infrared spectrum and IR
photodiode sensitive to only infrared spectrum during ambient light sensing. It is necessary for device host
(user side) to get illuminance value with calculation of both CLEAR data at D5[15:0] and IR data at D6[15:0].
Ambient light sensor mode
ALS
ALS
ALS
ALS
D5[15:0]
clear
result
clear
result
clear
result
clear
result
D6[15:0]
infrared
result
infrared
result
infrared
result
infrared
result
Fig.7 Output results for ALS mode
The results of without infrared light can be obtained by some calculation using D5[15:0] and D6[15:0].
The results of without infrared light = α*D5[15:0] – β*D6[15:0]
α and β factor are decided by ratio of D6 [15:0]/D5 [15:0].
These factors might be necessary to be adjusted according to the case panel in use.
Sheet No.: OP14043EN
Attachment-7
GP2AP054A00F
2.4. Gesture sensor (GS) and Ambient light sensor (ALS) alternating mode
This product is possible to operate both GS and ALS modes alternately.
Below is an example of GS and ALS alternating mode (Average consumption current is typical 2.2mA.)
Table 6. Example of setting for GS and ALS alternating mode
Register value
ADDR
Register setting
Example
bite
Hex
OP[3]=b’1
Active
00h
1000_0000
80h
OP[1:0]=b’00
GS and ALS mode
01h
PIN[2:0]=100
GS Interrupt
02h
0100_1110
4Eh
INTTYPE[2:0]=111
Pulse interrupt
0100_1000
48h
RES_A[1 :0]=01
16bit
03h
RANGE_A[3 :0]=
⇔
⇔
x1⇔x512range
0xxx_x000⇔1xxx_x111
1100_1111
CFh
04h
0000_0001
01h
PRST[2 :0]=011
PRST 4cycle
05h
0110_1001
69h
RES_P[1 :0]=01
12bit
RANGE_P[2 :0]=001
x2 range
IS[2 :0]=110
IS=150mA
06h
1100_1101
CDh
SUM[2 :0]=011
LED Pulse x16
07h
1111_1010
FAh
INTVAL_P[2 :0]=010
Interval time7.7msec
0Ch
0000_0000
00h
OS_D0[13 :0]=d 00
0Dh
0000_0000
00h
0Eh
0000_0000
00h
OS_D1[13 :0]=d 00
0Fh
0000_0000
00h
10h
0000_0000
00h
OS_D2[13 :0]=d 00
11h
0000_0000
00h
12h
0000_0000
00h
OS_D3[13 :0]=d 00
13h
0000_0000
00h
41h
0000_0000
00h
*1 The range (×1 or ×512) is switched according to the D5 data.
Low_lux_mode:×1,High_lux_mode:×512
Maximum detectable
range (ALS)*1
At Gesture mode
In GS/PS and ALS alternating mode, the way of detection is as follows;
[1]In LED on/off period, this device store a signal charge which is subtracted LEDoff period charge from
LEDon period charge automatically. (Recommend setting for SUM[2:0] is 16times of LED pulses.)
[2]In Count period, this device convert from a signal charge to digital value.
(Recommend setting for RES_P[1:0] is 12bit resolution.)
[3]Then, obtain detection result by subtracting the influence of ambient light. By using this value, proximity
sensing judgment is done if reflective object is there or not.
[4] The device integrates incident light in CLEAR photodiode and IR photodiode during a set period
(recommended value:7.7msec), and then outputs the detection results to D5[15:0] and D6[15:0] respectively.
GS ans ALS alternative mode
GS
ALS
D0-3[13:0]
Gesture
result
Gesture
result
Gesture
result
Gesture
result
Gesture
result
proximity
result
proximity
result
proximity
result
proximity
result
proximity
result
D4[15:0]
GS
ALS
GS
ALS
GS
ALS
GS
D5[15:0]
Clear
result
D6[15:0]
infrared
result
ALS
Fig.8 Output results for GS/PS and ALS alternating mode
Sheet No.: OP14043EN
Attachment-8
GP2AP054A00F
2.5. Proximity sensor (PS) and Ambient light sensor (ALS) alternating mode
This product is possible to operate both PS and ALS modes alternately.
Below is an example of PS mode and ALS alternating mode (Average consumption current is typical 0.9mA.)
Table 7. Example of setting for PS and ALS alternating mode
Register value
ADDR
Register setting
Example
bite
Hex
OP[3]=b’1
Active
00h
1000_0000
80h
OP[1:0]=b’00
PS and ALS mode
01h
PIN[2:0]=001
PS Interrupt
02h
0001_1110
1Eh
INTTYPE[2:0]=111
Pulse interrupt
0100_1000
48h
RES_A[1 :0]=01
16bit
03h
RANGE_A[3 :0]=
⇔
⇔
x1⇔x512range
0xxx_x000⇔1xxx_x111
1100_1111
CFh
04h
0000_0001
01h
PRST[2 :0]=011
PRST 4cycle
05h
0110_1001
69h
RES_P[1 :0]=01
12bit
RANGE_P[2 :0]=001
x2 range
IS[2 :0]=110
IS=150mA
06h
1100_1101
CDh
SUM[2 :0]=011
LED Pulse x16
07h
1111_1011
FBh
INTVAL_P[2 :0]=011
Interval time 30msec
08h
1110_1000
E8h
PL[15 :0]=d 1000
Loff=115mm
09h
0000_0011
03h
0Ah
1101_1100
DCh
PH[15 :0]=d 1500
Lon=100mm
0Bh
0000_0101
05h
0Ch
0000_0000
00h
OS_D0[13 :0]=d 00
0Dh
0000_0000
00h
0Eh
0000_0000
00h
OS_D1[13 :0]=d 00
0Fh
0000_0000
00h
10h
0000_0000
00h
OS_D2[13 :0]=d 00
11h
0000_0000
00h
12h
0000_0000
00h
OS_D3[13 :0]=d 00
13h
0000_0000
00h
41h
0000_0000
00h
*1 The range(×1 or ×512) is switched according to the D5 data.
Low_lux_mode:×1,High_lux_mode:×512
Maximum detectable
range (ALS)*1
At Proximity mode
2.6. Shutdown mode
Control power supply to the circuit. LED drive circuit is always off in shutdown mode.
After power on, start with shutdown.
Below is an example of shutdown mode. (Average consumption current is typical 0.004mA.)
If you shut down, the INT terminal states are maintained. If the INT terminal is L level,
due to the increased power consumption, it is recommended that you clear the interrupt.
ADDR
00h
01h
Table 8. Example of setting for Shutdown mode
Register value
Register Setting
bite
Hex
0000_0000
00h
OP[3]=b’0
0000_0000
00h
Example
Shutdown
CLEAR
Sheet No.: OP14043EN
Attachment-9
GP2AP054A00F
3. INT terminal output mode
3.1. Proximity detection/non-detection sensing result output mode
INT terminal operates with sensing result output mode by setting PIN[2:0] register (Address 02H)
000:detection/non-detection sensing result output mode. Sensing result whether or not object is detected
is able to be read out via I2C bus interface and output from INT terminal with negative logic.
PIN[2:0]
000
Table 9. INT terminal setting (Proximity detection mode)
Setting
Output data
Interrupt output for
PROX
PROX(detection/non-detection)
Fig.9 Detection result output mode
Sheet No.: OP14043EN
Attachment-10
GP2AP054A00F
3.2. Interrupt output mode
Operates as interrupt output mode by setting PIN[2:0] register (Address 02H) 001,010,100: interrupt output mode.
Table 10. INT terminal setting (PIN[2:0] register)
Setting
Interrupt output for PS only
Interrupt output for ALS only
Interrupt output for GS only
PIN[2:0]
001
010
100
Output data
FLAG_P
FLAG_A
FLAG_G
There are two kinds of output mode (level interrupt & pulse interrupt) by setting INTTYPE[2:0] register
(Address 02H) 000 or 111. Below is a description of the level interrupt type.
Table 11. INT terminal setting (INTTYPE[2:0] register)
INTTYPE[2:0]
Setting
000
Level interrupt
111
Pulse interrupt
000: level interrupt type
In this case, transition from H to L in INT terminal become occurring interrupt signal and INT terminal
will hold L level until interrupt is cleared.
level interrupt type
INT terminal
(H→L)
High
Occuring interrupt
Clearing interrupt
Reading data
Low
Fig.10 Interrupt output (level interrupt type)
111: pulse interrupt type
In this case, L pulse output in INT terminal become occurring interrupt signal and INT terminal will not
hold L level. Therefore we need not to clear interrupt flag (FLAG_P, FLAG_A). FLAG_P and FLAG_A
are cleared automatically in 1 clock (about 0.47us).
pulse interrupt type
INT terminal
(H→L)
Occuring interrupt
High
Reading data
Low
Fig.11 Interrupt output (pulse interrupt type)
The result of interrupt judgment is written into FLAG_x register (Address 01H), and is read out from
I2C bus interface. (0: Non-interrupt, 1: interrupt)
In this case, transition from H to L in INT terminal become occurring interrupt signal and INT terminal
will be hold L level until interrupt is cleared. Interrupt will be cleared in writing 0 data in FLAG_x register.
Detecting operation will continue while INT terminal is L level. Update ALS detection result D5[15:0],
D6[15:0] and sensing result of object detection/non-detection status. Therefore, host needs to read data
after FLAG_A and FLAG_P register clear.
Sheet No.: OP14043EN
Attachment-11
GP2AP054A00F
4. Register Mapping
4.1. Register Mapping
When Vcc power is supplied, GP2AP054A00F starts up with initializing all registers.
Table 12. Register Mapping
ADDRESS
REG NAM E
00H
COMMAND I
01H
COMMAND II
02H
COMMAND III
03H
04H
05H
DATA
D7
D6
OP3
D5
D4
OP1
OP0
FLAG_SAT 3 FLAG_SAT 2 FLAG_SAT 1 FLAG_SAT 0
D3
PROX
D2
FLAG_P
D1
FLAG_A
INT T YPE2 INT T YPE1 INT T YPE0
Recommend setting
ALS
GS_ALS
Initial
Value
GS
PS
H'00
H'A0
H'A0
H'90
H'80
FLAG_G
H'00
-
-
-
-
-
RST
H'00
H'4E
H'1E
-
H'4E
H'1E
D0
PS_ALS
H'80
0
PIN2
PIN1
PIN0
ALS I
RANGE_A3
1
0
RES_A1
RES_A0
RANGE_A2
RANGE_A1
RANGE_A0
H'00
-
-
H'48
H'48
H'48
ALS II
0
0
0
0
0
0
0
1
H'00
H'01
H'01
H'01
H'01
H'01
PS I
PRST 2
PRST 1
PRST 0
RES_P1
RES_P0
H'00
H'69
H'69
-
H'69
H'69
06H
PS II
IS2
IS1
IS0
SUM2
SUM1
H'00
H'CD
H'CD
-
H'CD
H'CD
07H
PS III
1
1
0
0
1
H'00
H'FA
H'FB
-
H'FA
H'FB
08H
PS_LT _LSB
PL7
PL6
PL5
PL4
PL3
PL2
PL1
PL0
H'00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AT A1 MSB
SAT 1
30H
DAT A2 LSB
D2_7
31H
DAT A2 MSB
SAT 2
32H
DAT A3 LSB
D3_7
33H
DAT A3 MSB
SAT 3
34H
DAT A4 LSB
D4_7
35H
DAT A4 MSB
36H
RANGE_P2 RANGE_P1 RANGE_P0
SUM0
0
1
INT VAL_P2 INT VAL_P1 INT VAL_P0
PH15
PH14
PH13
PH12
PH11
PH10
PH9
PH8
H'FF
-
H'05
-
-
H'05
OS_D0_7
OS_D0_6
OS_D0_5
OS_D0_4
OS_D0_3
OS_D0_2
OS_D0_1
OS_D0_0
H'00
H'00
H'00
-
H'00
H'00
OS_D0_13
OS_D0_12
OS_D0_11
OS_D0_10
OS_D0_9
OS_D0_8
H'00
H'00
H'00
-
H'00
H'00
OS_D1_5
OS_D1_4
OS_D1_3
OS_D1_2
OS_D1_1
OS_D1_0
H'00
H'00
H'00
-
H'00
H'00
OS_D1_13
OS_D1_12
OS_D1_11
OS_D1_10
OS_D1_9
OS_D1_8
H'00
H'00
H'00
-
H'00
H'00
OS_D2_5
OS_D2_4
OS_D2_3
OS_D2_2
OS_D2_1
OS_D2_0
H'00
H'00
H'00
-
H'00
H'00
OS_D2_13
OS_D2_12
OS_D2_11
OS_D2_10
OS_D2_9
OS_D2_8
H'00
H'00
H'00
-
H'00
H'00
OS_D3_5
OS_D3_4
OS_D3_3
OS_D3_2
OS_D3_1
OS_D3_0
H'00
H'00
H'00
-
H'00
H'00
OS_D3_13
OS_D3_12
OS_D3_11
OS_D3_10
OS_D3_9
OS_D3_8
H'00
H'00
H'00
-
H'00
H'00
PRE3_D0_5
PRE3_D0_4
PRE3_D0_3
PRE3_D0_2
PRE3_D0_1
PRE3_D0_0
H'00
P RE3_D0_13 P RE3_D0_12 P RE3_D0_11 P RE3_D0_10
PRE3_D0_9
PRE3_D0_8
H'00
PRE3_D1_5
PRE3_D1_2
PRE3_D1_1
PRE3_D1_0
H'00
P RE3_D1_13 P RE3_D1_12 P RE3_D1_11 P RE3_D1_10
PR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SB
D6_15
D6_14
D6_13
D6_12
D6_11
D6_10
D6_9
D6_8
H'00
3EH
ID
0
1
1
0
0
0
0
0
H'60
41H
PANEL
1
0
PANEL5
PANEL4
PANEL3
PANEL2
PANEL1
PANEL0
H'00
D1_6
D2_6
D3_6
Sheet No.: OP14043EN
Attachment-12
GP2AP054A00F
4.2. Precautions for Register setting
- Please start setting registers after power-supply voltage becomes stable up to 90% or more set value.
Please wait for some 1msec before setting registers from power-on.
- PROX, FLAG_P,FLAG_A and FLAG_G registers are able to be cleared by writing 0 data in each register.
(but these registers can’t be written 1 data.)
- Please don’t set the address 42H and the larger ones. (Test registers are assigned in those addresses)
4.3. Register Functions
Functions and set contents of the registers are shown below.
Table 13. description of the register function
ADDR
00H
register
function
Software shutdown
0:shutdown, 1:operation
PROX
detection/non-detection
0:non-detection, 1:detection
FLAG_P
PS interrupt result
FLAG_A
ALS interrupt result
0:non-interrupt, 1:interrupt
0:non-interrupt, 1:interrupt
FLAG_G
GS interrupt result
0:non-interrupt, 1:interrupt
PIN[2:0]
INTTYPE[2:0]
INT terminal setting
Interrupt type setting
000:PS(Detection/Non-detection),--1:FLAG_P,-1-:FLAG_A,1--:FLAG_G
000:level, 111:pulse
RST
Software Reset
0:not reset, 1:reset
RES_A[1:0]
RANGE_A[:0]
Resolution
M aximum measurable range
00:18bits(123msec),01:16bits(30msec),10:14bits(7.7msec),11:12bits(1.9msec)
0000:×1 - 0111:×128, 1110:X256, 1111:X512
PRST[2:0]
Number of measurement cycles
000:once - 111:8cycles
RES_P[1:0]
RANGE_P[2:0]
Resolution
M aximum measurable range
00:14bits(7.7msec),01:12bits(1.9msec),10:10bits(0.48msec),11:8bits(0.12msec)
IS[2:0]
LED drive peak current setting
SUM [2:0]
LED pulse setting
000:0mA、100:38mA、101:75mA、110:150mA、111:280mA、
000:x4, 001:X8, 010:X12, 011:×16, 100:X20, 101:X24, 110:×28, 111:×32
OP3
setting
OP[1:0]
FLAG_SAT[3:0]
01H
02H
03H
05H
06H
07H
INTVAL_P[2:0] GS Intermittent operating
001:×2, 010:×4, 011:×8, 100:×16
000:0msec, 001:1.9msec, 010:7.7msec, 011:30msec, 100:61msec, 101:123msec, 110:246msec, 111:492msec
08H.09H PL
0AH,0BH PH
Low threshold setting(Loff)
High threshold setting(Lon)
16bits counts setting
0CH,0DH OS_DATA0
DATA0 offset count(Offset0)
14bits counts setting
0EH,0FH OS_DATA1
DATA1 offset count(Offset1)
14bits counts setting
10H,11H OS_DATA2
DATA2 offset count(Offset2)
14bits counts setting
12H,13H OS_DATA3
DATA3 offset count(Offset3)
14bits counts setting
14H,15H PRE3_D0
16H,17H PRE3_D1
Data0 of the previous three
Data1 of the previous three
14bits output data of GS Photodiode0
14bits output data of GS Photodiode1
16bits counts setting
18H,19H PRE3_D2
Data2 of the previous three
14bits output data of GS Photodiode2
1AH,1BH PRE3_D3
1CH,1DH PRE2_D0
Data3 of the previous three
Data0 of the previous two
14bits output data of GS Photodiode3
14bits output data of GS Photodiode0
1EH,1FH PRE2_D1
Data1 of the previous two
14bits output data of GS Photodiode1
20H,21H PRE2_D2
22H,23H PRE2_D3
Data2 of the previous two
Data3 of the previous two
14bits output data of GS Photodiode2
14bits output data of GS Photodiode3
24H,25H PRE1_D0
Data0 of the previous one
26H,27H PRE1_D1
28H,29H PRE1_D2
Data1 of the previous one
Data2 of the previous one
14bits output data of GS Photodiode0
14bits output data of GS Photodiode1
2AH,2BH PRE1_D3
2CH,2DH D0
Data3 of the previous one
DATA0 result
14bits output data of GS Photodiode3
14bits output data of GS Photodiode0
2EH,2FH D1
DATA1 result
14bits output data of GS Photodiode1
30H,31H D2
32H,33H D3
DATA2 result
DATA3 result
14bits output data of GS Photodiode2
14bits output data of GS Photodiode3
34H,35H D4
DATA0-DATA3 sum
16bits output data of PS all Photodiode(D4=D0+D1+D2+D3)
36H,37H D5
38H,39H D6
DATA5 result
DATA6 result
16bits output data of CLR Photodiode
16bits output data of IR Photodiode
14bits output data of GS Photodiode2
3EH
ID[7:0]
Device ID
0110_0000
41H
PANEL[5:0]
PANEL count Subtraction
PANEL[5:3]:D0,D3 count Subtraction,PANEL[2:0]:D1,D2 count Subtraction
Sheet No.: OP14043EN
Attachment-13
GP2AP054A00F
5. Register settings for Basic operation
5.1. Operating mode selection: OP [3],OP [1:0] (ADDRESS:00H)
Select Software shutdown or ALS or GS (PS) or alternating mode (GS(PS) + ALS).
OP[3],OP[1:0] register (Address 00H)
0x00: Software shutdown
Control power supply to the circuit. LED drive circuit is always off in shutdown mode.
After power on, start with shutdown
1x00: GS (PS) and ALS alternating
1x01: ALS mode
Detection result of clear photodiode is output to D5[15:0] register (Address 36H, 37H).
Detection result of infrared photodiode is output to D6[15:0] register (Address 38H, 39H).
1x10: GS (PS) mode
Sensing result of detection/non-detection is output to PROX register (Address 01H).
Detection result of distance is output to D4[15:0] register (Address 34H, 35H).
5.2. Proximity detection/non-detection: PROX (ADDRESS 01H)
Sensing result for detection/non-detection is output. There is a function which clears data by writing 0
in PROX register.
PROX register (Address 01H): 0: non-detection, 1: detection
5.3. Interrupt result: FLAG_P,FLAG_A,FLAG_G (ADDRESS 01H)
FLAG_P register is output interrupt result for PS mode.
FLAG_A register is output interrupt result for ALS mode.
FLAG_G register is output interrupt result for GS mode.
There is a function which clears by writing 0 in FLAG register.
FLAG register (Address 01H) : 0: non-interrupt, 1: interrupt
5.4. INT terminal setting: PIN[2:0] (ADDRESS 02H)
Select output mode in INT terminal by setting PIN register (Address 02H).
The outputs by PROX, FLAG_P, FLAG_A and FLAG_G can be selected.
PIN[2:0]
000
001
010
100
Table 14. INT terminal setting
Setting
Interrupt output for PROX
(detection/non-detection)
Interrupt output for PS only
Interrupt output for ALS only
Interrupt output for GS only
Output data
PROX
FLAG_P
FLAG_A
FLAG_G
5.5. Interrupt type setting (for PS,ALS,GS): INTTYPE[2:0] (ADDRESS:02H)
Select level interrupt type or pulse interrupt type by setting INTTYPE register (Address 02H).
Table 15. INT terminal setting (INTTYPE[2:0] register)
INTTYPE[2:0]
Setting
000
Level interrupt
111
Pulse interrupt
5.6. Software reset: RST (ADDRESS 02H)
Initialize all registers by writing 1 in RST register. RST register is also initialized automatically and becomes 0.
5.7. Device ID: ID[7:0] (ADDRESS 3EH)
Device Identification Register is 0110_0000 (60h).
Sheet No.: OP14043EN
Attachment-14
GP2AP054A00F
6. Register settings for ALS
6.1. Resolution/Measuring duration setting for ALS mode: RES_A [1:0] (ADDRESS 03H)
Select measuring resolution and measuring duration for ALS mode by setting RES_A [1:0]
register (Address 03H).
If resolution is low, measuring tolerance becomes large. Please have an adjustment at your system.
Table 16. Resolution/Measuring duration setting for ALS mode
Measuring time
RES_A[1:0]
Resolution
Remarks
ALS mode
00
18bit
123msec
01
16bit
30msec
recommended
10
14bit
7.7msec
11
12bit
1.9msec
*Grayed-out portions is not recommended.
6.2. Maximum measurable range for ALS mode: RANGE_A[3:0] (ADDRESS 03H)
Select maximum measurable range for ALS mode by setting RANGE_A [3:0] register (Address 03H).
Detect with a set range in ALS mode. Maximum count value is outputted in case of incident light
exceeding maximum measurable range.
It is possible to have countermeasure for external light by setting a large count value at maximum
measurable range.
It is necessary to set them considering the condition in the actual use and evaluating at your system.
Table 17. Maximum measurable range for ALS mode
RANGE_A[3:0]
0xxx_x000
0xxx_x001
0xxx_x010
0xxx_x011
0xxx_x100
0xxx_x101
0xxx_x110
0xxx_x111
1xxx_x110
1xxx_x111
Maximum measurable range
ALS mode
×1
×2
×4
×8
×16
×32
×64
×128
×256
×512
Remarks
6.3. ALS Detection result: D5[15:0], D6[15:0] (ADDRESS 36H,37H,38H,39H)
Detection result of clear photodiode is output to D5[15:0] register (Address 36H, 37H).
Detection result of infrared photodiode is output to D6[15:0] register (Address 38H, 39H).
The results of without infrared light can be obtained by some calculation using D5[15:0] and D6[15:0].
The results of without infrared light = α*D5[15:0] – β*D6[15:0]
α and β factor are decided by ratio of D6 [15:0]/D5 [15:0].
These factors might be necessary to be adjusted according to the case panel in use.
Sheet No.: OP14043EN
Attachment-15
GP2AP054A00F
7. Register settings for GS and PS
7.1. Number of measurement cycles setting: PRST[2:0] (ADDRESS 05H)
Select number of measurement cycles by setting PRST[2:0] register. Judgment result for
detection/non-detection is over threshold continuously more than the set cycles in PRST[2:0] register.
This judgment result is done in using the detection result of distance (D4[15:0]).
Table 18. Number of measurement cycles setting
PRST[2:0]
Persistance Cycle
Remarks
000
001
010
011
100
101
110
111
1cycle
2cycles
3cycles
4cycles
5cycles
6cycles
7cycles
8cycles
recommended(gesture)
・Algorithm for detecting object in PS is as follows.
<Judge the change from non-detecting status to detecting status>
Detection result is over high threshold (Lon) N times continuously : Detection
Other : Non-detection
<Judge the change from detecting status to non-detecting status>
Detection result is over low threshold (Loff) N times continuously : Non-Detection
Other : Detection
7.2. Resolution/Measuring duration setting: RES_P [1:0] (ADDRESS 05H)
Select measuring resolution and measuring duration by setting RES_P[1:0] register (Address 05H).
If resolution is low, measuring tolerance becomes large. Please have an adjustment at your system.
Table 19. Resolution/Measuring duration setting
RES_P[1:0]
Resolution
Measuring duration
00
01
10
11
14bit
12bit
10bit
8bit
7.7msec
1.9msec
0.48msec
0.12msec
Remarks
recommended
*Grayed-out portions is not recommended.
7. 3. Maximum measurable range: RANGE_P[2:0] (ADDRESS 05H)
Select maximum measurable range by setting RANGE [2:0] register (Address 05H).
Detect with a set range. Maximum count value is outputted in case of incident light exceeding maximum
measurable range.
Adjusting detecting distance by proximity low threshold PL[15:0] and PH[15:0]. It is necessary to set
them considering the condition in the actual use and evaluating at your system.
Table 20. Maximum measurable range
RANGE_P[2:0]
Maximum measurable range
Remarks
001
010
011
100
×2
×4
×8
×16
recommended
*Grayed-out portions is not recommended.
Sheet No.: OP14043EN
Attachment-16
GP2AP054A00F
7.4. LED drive peak current setting IS[2:0] (ADDRESS 06H)
Enable to select LED drive peak current by setting IS[2:0] register (Address 06H).
In case of changing this setting, the count will change correspond to the set LED drive peak current.
Please adjust detecting distance with proximity low threshold PL[15:0] and proximity high threshold
PH[15:0].
LED drive peak current will depend on Vcc and VLED voltage.
(Refer to 12.1. LED drive peak current data)
Table 21. LED drive peak current
IS[2:0]
011
100
101
110
111
LED drive peak current
19 mA
38 mA
75 mA
150 mA
280 mA
Remarks
recommended
*Grayed-out portions is not recommended.
7.5. LED pulse setting: SUM[2:0] (ADDRESS 06H)
Select LED pulse setting by setting SUM[2:0] register (Address 06H).
If LED pulse setting is low, measuring tolerance becomes large. Please have an adjustment at your system.
Number of LED pulses can be changed from 4times to 32times.
Table 22. LED pulse setting
SUM[2:0]
LED pulse setting
000
001
010
011
100
101
110
111
×4 times
×8 times
×12 times
×16 times
×20 times
×24 times
×28 times
×32 times
Remarks
recommended
*Grayed-out portions is not recommended.
7.6. Gesture and Proximity low threshold (Loff): PL[15:0] (ADDRESS 08H、09H)
Sets proximity low threshold in PL[15:0] register at PS mode.
Please set it with confirming at optical mounting condition in the actual use.
7.7. Gesture and Proximity high threshold (Lon): PH[15:0] (ADDRESS 0AH、0BH)
Sets proximity high threshold in PH[15:0] register at PS mode.
Please set it with confirming at optical mounting condition in the actual use.
7.8. Gesture offset (Offset): OS_D0[13:0],OS_D1[13:0],OS_D2[13:0],OS_D3[13:0] (ADDRESS 0CH~13H)
Sets gesture offset in OS[13:0] register at GS mode.
If there is Panel crosstalk, you will be able to subtract the Panel crosstalk count by using gesture offset.
Please set it with confirming at optical mounting condition in the actual use.
Sheet No.: OP14043EN
Attachment-17
GP2AP054A00F
7.9. GS Detection result: D0[13:0],D1[13:0],D2[13:0],D3[13:0] (ADDRESS 2CH~33H)
Detection result of gesture sensing is output to D0[13:0],D1[13:0],D2[13:0] and D3[13:0]
register (Address 2CH~33H).
Detection result is defined as follows,
Detection result(D0[13:0]) = Raw count(D0[13:0], include panel crosstalk) – Offset(OS_D0[13:0])
Detection result(D1[13:0]) = Raw count(D1[13:0], include panel crosstalk) – Offset(OS_D1[13:0])
Detection result(D2[13:0]) = Raw count(D2[13:0], include panel crosstalk) – Offset(OS_D2[13:0])
Detection result(D3[13:0]) = Raw count(D3[13:0], include panel crosstalk) – Offset(OS_D3[13:0])
Gesture detection:
If the detected object on the right, D0[13:0]+D3[13:0] > D1[13:0]+D2[13:0].
If the detected object on the left, D0[13:0] +D3[13:0] < D1[13:0]+D2[13:0].
If the detected object on the top, D0[13:0]+D1[13:0] > D2[13:0]+D3[13:0].
If the detected object on the bottom, D0[13:0]+D1[13:0] < D2[13:0]+D3[13:0].
PD3
PD2
PD0
PD1
Fig.12 The built-in Photodiodes position(PD0, PD1, PD2, PD3).
Photodiode0(PD0) count value is stored to the raw count of D0[13:0].
Photodiode1(PD1) count value is stored to the raw count of D1[13:0].
Photodiode2(PD2) count value is stored to the raw count of D2[13:0].
Photodiode3(PD3) count value is stored to the raw count of D3[13:0].
7.10. Saturation Detection result of the integrator: SAT0, SAT1, SAT2, SAT3 (ADDRESS 01H)
Saturation detection result of the integrator is output to SAT0, SAT1, SAT2, SAT3 register (Address 01H).
If the integrator(PD0) is saturated, SAT0 register is set to 1.
If the integrator(PD1) is saturated, SAT1 register is set to 1.
If the integrator(PD2) is saturated, SAT2 register is set to 1.
If the integrator(PD3) is saturated, SAT3 register is set to 1.
7.11. PANEL count Subtraction: PANEL[5:0] (ADDRESS 41H)
Sets PANEL count Subtraction in PANEL[5:0] register at GS mode.
If there is Panel crosstalk, you will be able to subtract the Panel crosstalk count by using PANEL
count Subtraction.
Detection result D0[13:0] and D3[13:0] is subtracted by PANEL[5:3] register.
Detection result D1[13:0] and D2[13:0] is subtracted by PANEL[2:0] register.
Please set it with confirming at optical mounting condition in the actual use.
Sheet No.: OP14043EN
Attachment-18
GP2AP054A00F
7.12. Intermittent operating function: INTVAL_P[2:0] (ADDRESS 07H)
This function is to reduce average consumption current by stopping part of circuit intermittently,
and this is different from software shutdown function. Intermittent operating duration can be changed
by setting INTVAL_P[2:0] register.
Setting a longer intermittent operating duration makes LED average consumption current lower.
However, update period of the detection result becomes long. It will make response time of detecting longer.
Enable to change intermittent operating periods by setting INTVAL_P [2:0] register.
Table 23. Intermitting time setting
INTVAL_P[2:0]
Intermitting time setting
Remarks
000
001
010
011
100
101
110
111
0msec
1.9msec
7.7msec
30msec
61msec
123msec
246msec
492msec
not allowed
not allowed
recommended
recommended
*Grayed-out portions is not recommended.
For GS mode, quiescent operation will be after GS operation.
For GS and ALS alternating mode, ALS operation will be after GS operation.
Although setting a longer intermittent operating period contributes to reduce average consumption current,
it makes update period and response time for detection longer as a result. Need to set it considering your
actual conditions in use.
INTVAL_P[2:0]=010 :7.7msec setting
GS
Intermittent
(quiescent or ALS)
GS
Intermittent
(quiescent or ALS)
7.7msec
Fig.13 Intermittent operating
Sheet No.: OP14043EN
Attachment-19
GP2AP054A00F
8. Average consumption current
Average consumption current in operation is the sum of the average current consumption value with Vcc terminal
and LED consumption. The LED driven current flows from LEDA terminal to GND terminal.
8.1. Average consumption current with Vcc terminal
Average consumption current at GS mode is typical 0.32mA.
Average consumption current at ALS mode is typical 0.1mA.
Average consumption current at Shutdown mode is typical 0.004mA.
8.2. Average consumption current with VLED terminal
In case of continuous operation, average consumption current in LED is estimated as below.
[LED average consumption current]
= LED drive peak current × (LED pulse setting × 7.5usec) / (measuring time + Intermittence time)
[LED drive peak current]: IS[2:0] register.
011 : 19mA, 100 : 38mA, 101 : 75mA, 110 : 150mA
[LED pulse setting]: SUM[2:0] register.
000 : x4, 001 : x8, 010 : x12, 011 : x16, 100 : x20, 101 : x24, 110 : x28, 111 : x32
[measuring time] : Enable to set with RES_P[1:0] register.
00 : 7.7msec(14bit), 01 : 1.9msec(12bit), 10 : 0.48msec(10bit), 11 : 0.12msec(8bit)
[Intermittence operating time] : Enable to set with INTVAL_P[2:0] register.
000 : 0msec, 001 : 1.9msec, 010 : 7.7msec, 011 : 30msec
100 : 61msec, 101 : 123msec, 110 : 246msec, 111 : 492msec
For example,
[LED drive peak current]
: 150mA
IS[2:0]=110
[LED pulse setting]
: x16
SUM[2:0]=011
[measuring time]
: 1.9msec(12bit)
RES_P[1:0]=01
[Intermittence operating time]
: 7.7msec
INTVAL_P[2:0]=010
In the above case,
[LED averaging consumption current] =150mA×16×7.5usec/(1.9msec+7.7msec)=1.87mA
Also, using auto-shut down function, it will be automatically shutdown after one operation.
Utilizing it with adjusting your system, it contributes to reduce averaging consumption current in LED.
Sheet No.: OP14043EN
Attachment-20
GP2AP054A00F
9. Example of setting sequence
9.1. From Power-On to operating condition
The internal register of GP2AP054A00F are all initialized after powering on. (Power-On-Reset)
Insert a wait for at least 1ms until the Power-On-Reset state stabilizes.
Power-On
Power-On-Reset
Wait for at least 1ms
Shutdown condition
Start I2C setting
Operating condition
Fig.14 From Power-On to operating condition
9.2. From operating condition to Power-Off
Insert a wait for at least 1ms until shutdown state stabilizes.
Active
Operating condition
Setting Shutdown mode
Shutdown condition
Wait for at least 1ms
Power-Off
Fig.15 From operating condition to Power-Off
9.3. Power-On and Power-Off
The following figure shows configuration sequence at Power-On and Power-Off
>=1ms
>=1ms
Power-On-Reset
Vcc
Shutdown
>=0us
>=0us
VLED
SDA/SCL
Power-On sequence
Operating condition
Power-Off sequence
Fig.16 Power-On and Power-Off
Sheet No.: OP14043EN
Attachment-21
GP2AP054A00F
10. Device Driver
10.1. Device Driver
We can provide a device driver for this product.
If you need support for the software, please contact me feel free.
11. Recommended Window Size (Reference)
11.1. Without light shield
R
Light Shielding area
Window
2.65
1.375
30°
0.95
30°
9
t
1.275
Detector
IR Emitter
Light Shielding area
GP2AP054A00F
h = 0.95 mm
Cg = (h+g) × tan30°
R = (h+g) × tan30°
g≦0.4mm (recommended) g : distance between sensor and panel
t≦0.7mm (recommended) t : thickness of panel
Fig.17 Recommended window size (Without light shield)
1. Please print or tape up not to transmit infrared.
2. Please execute the Light Shielding between windows.
3. Even recommended window size may cause malfunction depending on the reflection from the panel.
In this case, it is effective to be extended the printing area between windows, but affects detection
distance and ALS output.
4. Please confirm that there is no problem with an actual machine in consideration of the implementation gap,
the misalignment of the windows and voltage variation.
5. The recommended transmissivity (400nm≦λ≦1100nm) of the window is more than 85%.
Sheet No.: OP14043EN
Attachment-22
GP2AP054A00F
12. Data (Reference)
12.1. LED drive peak current
12.1.1. LED drive peak current vs. VLED (Vcc=3V)
LED drive current [mA]
LED drive current vs. VLED (Vcc=3.0V)
200
190
180
170
160
150
140
130
120
110
100
90
80
70
60
50
40
30
20
10
0
2.2
ILED=150mA (IS[2:0]=110)
ILED=75mA (IS[2:0]=101)
ILED=38mA (IS[2:0]=100)
ILED=19mA (IS[2:0]=011)
2.3
2.4
2.5
2.6
2.7
2.8
2.9
3.0
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
VLED [V]
Fig.18 LED drive peak current vs. VLED
12.1.2. LED drive peak current vs. Vcc (VLED=3V)
LED drive current [mA]
LED drive current vs. Vcc (VLED=3.0V)
200
190
180
170
160
150
140
130
120
110
100
90
80
70
60
50
40
30
20
10
0
2.2
ILED=150mA (IS[2:0]=110)
ILED=75mA (IS[2:0]=101)
ILED=38mA (IS[2:0]=100)
ILED=19mA (IS[2:0]=011)
2.3
2.4
2.5
2.6
2.7
2.8
2.9
3.0
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
Vcc [V]
Fig.19 LED drive peak current vs. Vcc
Sheet No.: OP14043EN
Attachment-23
GP2AP054A00F
12.2. Spectral Responsivity
Spectral Responsivity
1
CLR
0.9
IR
Normalized Responsivity
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
300
500
700
900
1100
Wavelength [nm]
Fig.20 Spectral Responsivity
12.3. Proximity sensor (PS) mode
Sensor output counts vs. distance
PS count vs distance
Vcc=VLED=3.0V, Res=12bit, Range=×2, sum=16, ILED=150mA
Gray Card (r=1.8)
White Card (r=0.9)
4000
3500
3000
Count
2500
2000
1500
1000
500
0
0
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
Distance (mm)
Fig.21 Sensor output counts vs. distance
Sheet No.: OP14043EN
Attachment-24
GP2AP054A00F
12.4. Angular dependence
Angular dependence
1.1
1
Normalized Responsivility
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
-90 -80 -70 -60 -50 -40 -30 -20 -10
0
10
20
30
40
50
60
70
80
90
angle [ °]
Fig.22 Angular dependence
Sheet No.: OP14043EN
Attachment-25