TSL2562 TAOS [TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS], TSL2562 Datasheet - Page 20

no-image

TSL2562

Manufacturer Part Number
TSL2562
Description
LOW-VOLTAGE LIGHT-TO-DIGITAL CONVERTER
Manufacturer
TAOS [TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS]
Datasheet
TSL2562, TSL2563
LOW-VOLTAGE
LIGHT-TO-DIGITAL CONVERTER
TAOS066N − AUGUST 2010
Configuring the Timing Register
// Set up Timing Register
//Read data registers (see Basic Operation example)
//Perform Manual Integration
//Read data registers (see Basic Operation example)
20
Copyright E 2010, TAOS Inc.
The command, timing, and control registers are initialized to default values on power up. Setting these registers
to the desired values would be part of a normal initialization or setup procedure. In addition, to maximize the
performance of the device under various conditions, the integration time and gain may be changed often during
operation. The following pseudo code illustrates a procedure for setting up the timing register for various
options:
//Low Gain (1x), integration time of 402ms (default value)
Address = 0x39
Command = 0x81
Data = 0x02
WriteByte(Address, Command, Data)
//Low Gain (1x), integration time of 101ms
Data = 0x01
WriteByte(Address, Command, Data)
//Low Gain (1x), integration time of 13.7ms
Data = 0x00
WriteByte(Address, Command, Data)
//High Gain (16x), integration time of 101ms
Data = 0x11
WriteByte(Address, Command, Data)
//Set up for manual integration with Gain of 1x
Data = 0x03
//Set manual integration mode – device stops converting
WriteByte(Address, Command, Data)
//Begin integration period
Data = 0x0B
WriteByte(Address, Command, Data)
//Integrate for 50ms
Sleep (50)
//Stop integrating
Data = 0x03
WriteByte(Address, Command, Data)
APPLICATION INFORMATION: SOFTWARE
r
www.taosinc.com
//Wait for 50ms
r
The LUMENOLOGY r Company

Related parts for TSL2562