|
TCS3404_11 Datasheet, PDF (30/41 Pages) ams AG – DIGITAL COLOR SENSORS | |||
|
◁ |
TCS3404, TCS3414
DIGITAL COLOR SENSORS
APPLICATION INFORMATION: SOFTWARE
TAOS137A â APRIL 2011
A synchronization input (SYNC IN) is supported to precisely start/stop sensor integration and synchronize with
the light source. The TIMING Register (01h) provides two synchronization modes of operation. The first mode
of operation synchronizes the SYNC IN pin for one integration cycle as specified in the Timing Register (01h).
When the rising edge of the signal is detected, the TCS3404/14 begins integration. The second mode
accumulates a specified number of SYNC IN pulses (see Timing Register) in which the minimum pulse width
is 50 μs. A pulse counter is used to count the rising and falling edges of the pulse(s) and precisely integrate the
light level when the SYNC IN pulse is high.
The following pseudo code illustrates a procedure for reading the TCS3404/14 device using the synchronization
lid feature:
// Synchronize one integration cycle
// See âBasic Operationâ to powerâon and start device
a // See âConfiguring the Timing Registerâ to setup environment
v Address = 0x39
Command = 0x81
ill Data = 0x21
//Slave addr â also 0x29 or 0x49
//Set Command bit and address Timing Register
//Sync one 100ms integration period
//External SYNC IN pulse initiates 100ms integration
Sleep (100)
t // See âBasic Operationâ to read Data Registers using Byte or Word Protocol
AG t s // Synchronize N number of SYNC IN pulses
// See âBasic Operationâ to powerâon and start device
// See âConfiguring the Timing Registerâ to setup environment
s n Address = 0x39
e Command = 0x81
m t Data = 0x30
//Slave addr â also 0x29 or 0x49
//Set Command bit and address Timing Register
//Integrate one SYNC IN pulse
//External SYNC IN pulse synchronizes integration
Technicaal con // See âBasic Operationâ to read Data Registers using Byte or Word Protocol
The LUMENOLOGY r Company
r
r
www.taosinc.com
Copyright E 2011, TAOS Inc.
29
|
▷ |