User Manual
12
An Interrupt can be generated with each new proximity
result or whenever proximity results exceed or fall below
levels set in the PIHT and/or PILT threshold registers. To
prevent premature/ false interrupts an interrupt persis-
tence lter is also included; interrupts will only be assert-
ed if the consecutive number of out-of-threshold results
is equal or greater than the value set by PPERS. Each “in-
threshold” proximity result, PDATA, will reset the persis-
tence count. If the analog circuitry becomes saturated,
the PGSAT bit will be asserted to indicate PDATA results
may not be accurate. The PINT and PGSAT bits are always
available for I²C polling, but PIEN bit must be set for PINT
to assert a hardware interrupt on the INT pin. Similarly,
saturation of the analog data converter can be detected
by polling PGSAT bit; to enable this feature the PSIEN bit
must be set. PVALID is cleared by reading PDATA. PGSAT,
and PINT are cleared by “address accessing” (i.e. I²C trans-
action consisting of only two bytes: chip address, followed
by a register address with R/W=1) PICLEAR or AICLEAR.
Table 3. Color / ALS Controls
Register/Bit Address Description
ENABLE<PON> 0x80<1> Power ON
ENABLE<AEN> 0x80<2> ALS Enable
ENABLE<AIEN> 0x80<4> ALS Interrupt Enable
ENABLE<WEN> 0x80<3> Wait Enable
ATIME 0x82 ALS ADC Integration Time
WTIME 0x83 Wait Time
AILTL 0x84 ALS low threshold, lower byte
AILTH 0x85 ALS low threshold, upper byte
AIHTL 0x86 ALS high threshold, lower byte
AIHTH 0x87 ALS high threshold, upper byte
PERS<APERS> 0x8C<3:0> ALS Interrupt Persistence
CONFIG1<WLONG> 0x8D<1> Wait Long Enable
CONTROL<AGAIN> 0x8F<1:0> ALS Gain Control
CONFIG2<CPSIEN> 0x90<6> Clear diode Saturation Interrupt Enable
STATUS<CPSAT> 0x93<7> Clear Diode Saturation
STATUS<AINT> 0x93<4> ALS Interrupt
STATUS<AVALID> 0x93<0> ALS Valid
CDATAL 0x94 Clear Data, Low byte
CDATAH 0x95 Clear Data, High byte
RDATAL 0x96 Red Data, Low byte
RDATAH 0x97 Red Data, High byte
GDATAL 0x98 Green Data, Low byte
GDATAH 0x99 Green Data, High byte
BDATAL 0x9A Blue Data, Low byte
BDATAH 0x9B Blue Data, High byte
CICLEAR 0xE5 Clear Channel Interrupt Clear
AICLEAR 0xE7 All Non-Gesture Interrupt Clear