tsl2580 ETC-unknow, tsl2580 Datasheet - Page 20

no-image

tsl2580

Manufacturer Part Number
tsl2580
Description
Light-to-digital Converter
Manufacturer
ETC-unknow
Datasheet
TSL2580, TSL2581
LIGHT-TO-DIGITAL CONVERTER
TAOS098 − MARCH 2010
// Read ADC Channels Using Read Word Protocol − RECOMMENDED
20
Copyright E 2010, TAOS Inc.
//Address the Ch0 lower data register and configure for Read Word
Command = 0Xb4
//Reads two bytes from sequential registers 0x14 and 0x15
//Results are returned in DataLow and DataHigh variables
ReadWord (Address, Command, DataLow, DataHigh)
Channel0 = 256 * DataHigh + DataLow
//Address the Ch1 lower data register and configure for Read Word
Command = 0xb6
//Reads two bytes from sequential registers 0x16 and 0x17
//Results are returned in DataLow and DataHigh variables
ReadWord (Address, Command, DataLow, DataHigh)
Channel1 = 256 * DataHigh + DataLow
r
www.taosinc.com
//Set Command bit and Word bit
//Set Command bit and Word bit
//Shift DataHigh to upper byte
r
The LUMENOLOGY r Company

Related parts for tsl2580