English
Language : 

LTR-556ALS-01 Datasheet, PDF (33/40 Pages) Lite-On Technology Corporation – Optical Sensor
Optical Sensor
LTR-556ALS-01
// Set LED Peak Current 5mA (pulse freq 60kHz, duty cycle 100%)
Register_Addr = 0x82
// PS_LED register
Command = 0x78
// Peak Current = 5mA, (pulse freq 60kHz, duty cyc 100%)
// For Peak Current = 10mA, (60kHz, 100%), Command = 0x79
// For Peak Current = 20mA, (60kHz, 100%), Command = 0x7A
// For Peak Current = 50mA, (60kHz, 100%), Command = 0x7B
WriteByte(Slave_Addr, Register_Addr, Command)
PS Measurement Rate
// The PS_MEAS_RATE register controls the PS measurement rate.
// Default setting of the register is 0x02 (repeat rate 100ms)
Slave_Addr = 0x23
// Slave address of LTR-556 device
// Set PS Repeat Rate 50ms
Register_Addr = 0x84
Command = 0x00
WriteByte(Slave_Addr, Register_Addr, Command)
// PS_MEAS_RATE register
// Meas rate = 50ms
// For Meas rate = 500ms, Command = 0x04
ALS Measurement Rate
// The ALS_MEAS_RATE register controls the ALS integration time and measurement rate.
// Default setting of the register is 0x03 (integration time 100ms, repeat rate 500ms)
Slave_Addr = 0x23
// Slave address of LTR-556 device
// Set ALS Integration Time 200ms, Repeat Rate 200ms
Register_Addr = 0x85
// ALS_MEAS_RATE register
Command = 0x12
// Int time = 200ms, Meas rate = 200ms
// For Int time = 400ms, Meas rate = 500ms, Command = 0x1B
WriteByte(Slave_Addr, Register_Addr, Command)
ALS Data Registers (Read Only)
// The ALS Data Registers contain the ADC output data for the respective channel.
// These registers should be read as a group, with the lower address being read first.
Slave_Addr = 0x23
// Slave address of LTR-556 device
// Read back ALS_DATA_CH1
Register_Addr = 0x88
ReadByte(Slave_Addr, Register_Addr, Data0)
Register_Addr = 0x89
ReadByte(Slave_Addr, Register_Addr, Data1)
// ALS_DATA_CH1 low byte address
// ALS_DATA_CH1 high byte address
// Read back ALS_DATA_CH0
Register_Addr = 0x8A
ReadByte(Slave_Addr, Register_Addr, Data2)
Register_Addr = 0x8B
ReadByte(Slave_Addr, Register_Addr, Data3)
// ALS_DATA_CH0 low byte address
// ALS_DATA_CH0 high byte address
ALS_CH1_ADC_Data = (Data1 << 8) | Data0
ALS_CH0_ADC_Data = (Data3 << 8) | Data2
// Combining lower and upper bytes to give 16-bit Ch1 data
// Combining lower and upper bytes to give 16-bit Ch0 data
32/39
Part No. : LTR-556ALS-01
BNS-OD-FC002/A4