Application Note 1657
5
AN1657.0
August 12, 2011
Control Register 01 (Hex)
RANGE/GAIN SELECTION
The ADC has four I
2
C programmable range (gain) selections to
dynamically accommodate various lighting conditions. For
example, a very bright object requires a higher range (e.g., 64k)
than a dark object, which requires a low range (e.g., 1k). Higher
ranges reduce photo detector sensitivity. In the ISL76683 Light
Sensor Evaluation Software window, in the Control Reg - b001
dialog area, under Range, click one of the four radio buttons to
select the range to match lighting conditions.
Interrupt Control Register 01 (Hex) and
Threshold Registers 02 (Hex) and 03 (Hex)
Interrupt thresholds are stored in Registers 0x02 and 0x03. In
the Interrupt Control dialog (Figure 12), enter values in the Upper
Interrupt Limit R2 and Lower Interrupt Limit R3 text boxes and
click Write to edit the interrupt thresholds. (See the
ISL76683
datasheet
for more information on interrupt limits.) The interrupt
thresholds act as an alarm or monitoring function to determine
whether the ADC count exceeds the upper or lower limit.
To set the interrupt limits in the Interrupt Control dialog (see
Table 2 for parameter descriptions):
1. Click one of the four radio buttons across the top of the dialog
window to choose an interrupt persistence value
(recommended value: 8 Trip).
2. Enter decimal values in the Upper Interrupt Limit R2 and
Lower Interrupt Limit R3 text boxes. The upper limit must be
greater than the lower limit. Values for the limits depend on
the application, the configuration of other options, and the
distance at which you choose to flag.
3. Click Write and then click Read. Verify the desired limit values
by comparing the values entered for the intended limits to the
values in the Device Registers dialog after clicking Read. If
they do not match, repeat Steps 2 and 3.
4. Click Clear Interrupt to clear or reset the interrupt status bit.
5. You can manually poll the Interrupt pin (Pin 4 on the
ISL76683EVAL1Z evaluation board) or you can set it to be
polled automatically. To poll it manually, click Sample
External Int Pin. To poll it automatically, click the Poll Interrupt
check box to select it.
With interrupt limits set, you can begin collecting data. Data is
collected within the upper and lower limits you selected. In the
Interrupt Control dialog, in the Interrupt Monitor area, black
boxes indicate an unflagged status that is within limits. Red
boxes indicate the data collected is either above the upper limit
or below the lower limit and that the interrupt flag has been
triggered.
FIGURE 11. RANGE/GAIN SELECT
FIGURE 12. INTERRUPT CONTROL
TABLE 2. INTERRUPT CONTROL PARAMETERS
PARAMETER
DESCRIPTION
Interrupt Persistence
Sets the number of times the upper limit is
exceeded or lower limit is subceeded before
an alarm or interrupt flag is raised.
Upper Interrupt Limit R2 Applies to Interrupt Threshold HI Register
0x02. This register sets the HI threshold for the
Interrupt pin and the interrupt flag. By default,
the interrupt threshold HI is FF (hex). The 8-bit
data written to the register represents the
upper MSB of a 16-bit value. The LSB is always
00 (hex).
Lower Interrupt Limit R3 Applies to Interrupt Threshold LO Register
0x03. This register sets the LO threshold for
the Interrupt pin and the interrupt flag. By
default, the Interrupt threshold LO is 00 (hex).
The 8-bit data written to the register
represents the upper MSB of a 16-bit value.
The LSB is always 00 (hex).
Write, Read
Store or read values in the upper and lower
interrupt limit threshold Registers 0x02 and
0x03.
Clear Interrupt
Click Clear Interrupt to clear or reset the
interrupt status bit.
Sample External Int Pin Manually sample the external interrupt pin
(Pin 4) on the IC.
Poll Interrupt
Allows checking of the external interrupt
status while sampling data.
Interrupt Monitor
• Square indicator light displays status:
black means no fault; red means an
interrupt fault.
• Monitor external interrupt pin manually by
clicking Sample External Int Pin button or
automatically by clicking Poll Interrupt
check box to select it. Reg b001, Bit h20,
can only be monitored manually.