TSL2580, TSL2581
LIGHT-TO-DIGITAL CONVERTER
TAOS098 − MARCH 2010
// Read ADC Channels Using Read Word Protocol − RECOMMENDED
//Address the Ch0 lower data register and configure for Read Word
Command = 0Xb4
//Set Command bit and Word bit
//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
//Set Command bit and Word bit
//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
//Shift DataHigh to upper byte
Technicaaml scoAnGtent still
valid
Copyright E 2010, TAOS Inc.
20
r
www.taosinc.com
The LUMENOLOGY r Company
r