High power LED driver for single Flash with I²C interface
Introduction
This application note is dedicated to the design of a Flash LED driver using the STCF06
device, which is a buck-boost current mode converter with an I
functional description, recommendations for PCB layout and external components selection
are also discussed in this application note. This device is designed for driving a single LED
with a forward voltage range from 2.7 to 5 V.
C bus packets timing for a Flash lasting longer than FTIM max . . . . . . . . . . . . . . . . . . . 27
5/28
Schematic descriptionAN2730
1 Schematic description
The Flash LED driver STCF06 has a high operational frequency (1.8 MHz) which allows the
usage of smallexternal components.
1.1 Application schematic
Figure 2.A typical application schematic
(Note 2)
STCF06
(Note 1)
(Note 2)
Note 1: connect to V1, or GND or SDA or SCL to choose one of the 4 different I²C slave addresses
Note 2: optional components to support auxiliary functions
(Note 2)
6/28
AN2730Selection of external components
2 Selection of external components
2.1 Input and output capacitor selection
It is recommended to use ceramic capacitors with low ESR as input and output capacitors. It
is recommended to use 2x10 µF/6.3 V as a minimum value for the input capacitor, and
4.7 µF/6.3 V as the optimal value for the output capacitor to achieve a good stability of the
device, for a supply range varying from low input voltage (2.7 V) to the maximum ratings of
output power.
Note:see recommended components in Tab le 1 .
2.2 Inductor selection
A thin shielded inductor with a low DC series resistance of winding is recommended for this
application. To achieve a good efficiency in step-up mode, it is recommended to use an
inductor with a DC series resistance R
DCL=RD
resistance of the LED.
For nominal operation, the peak inductor current can be calculated by the following formula:
/10 [ Ω;Ω ], where RD is the dynamic
Equation 1
I
PEAK
= ((I
/ η) + ((V
OUT
– VIN) x VIN ²) / (2 x L x f x V
OUT
Where:
●I
●I
●η:Efficiency of the STCF06
●V
●V
●L: Inductance value of the inductor
●f: Switching frequency
: Peak inductor current
PEAK
: Current sourced at the V
OUT
: Output voltage at the V
OUT
: Input voltage at the V
IN
BAT
- pin, this is the LED current
OUT
- pin
OUT
- pin
Note:see recommended components in Tab le 1 .
2.3 LED selection
All LEDs with a forward voltage range ranging from 2.7 V to 5 V are compatible with
STCF06. The forward voltage spread of any selected LED must however lay within this
range (2.7 V to 5 V). It is possible to set the maximum level of the LED current in Flash
mode and Torch mode by setting the values of the corresponding sensing resistors, lower
current values can be then set through the I
LED with forward voltage as low as possible to get the best performance in terms of current
consumption and efficiency
²)) x V
OUT
2
C port. It is strongly recommended to use the
OUT
/ V
IN
Note:see recommended components in Tab le 1 .
7/28
Selection of external componentsAN2730
2.4 D1 selection
All the Schottky diodes are compatible with the STCF06. It is recommended to use the
Schottky diode with forward voltage as low as possible to get the best performance of the
application in terms of input current consumption and efficiency of the application.
Note:see recommended components in Tab le 1 .
2.5 RFL selection
The value of the RFL resistor can be calculated by the following equations:
Equation 2
Equation 3
R
FL=VFB2/IFLASH(max)
P
RFLASH=RFL*IFLASH
where V
= 227 mV
FB2
2
where P
is the power dissipated on the RFL resistor. It is recommended to use a thin
RFL
metal film resistor in the 0606 package size and 1% tolerance. The maximum LED current in
Flash mode for STCF06 is 1.5 A for a battery voltage ranging from 3.5 V to 5.5 V, 1.3 A from
3 V to 3.5 V and 1 A from 2.7 V to 3 V.
2.6 RTR selection
The value of the RTR resistor can be calculated by the following equations:
Equation 4
and
Equation 5
where P
RTORCH
equation R
It is recommended to use a thin metal film resistor with 1% or 5% tolerance. The maximum
LED current in torch mode for SCTF03 is 370 mA for a battery voltage ranging from 2.7 V to
5.5 V.
is the power dissipated on the RTR resistor. It is recommended to follow the
=6.66* RFL to avoid any jump in the current DIMMING values.
TR
R
= (V
P
=R
-I
*R
)/I
2
*I
2.7 NTC AND RX resistor selection
STCF06 supports the usage of a negative thermistor (NTC) for sensing the LED
temperature. In order to implement this functionality, the R
reference are needed too. Once the NTC feature is activated, the internal switch connects
the R
resistor to the NTC, and this creates a voltage divider supplied by the external
X
reference voltage connected to the NTC.
8/28
resistor and an external voltage
X
AN2730Selection of external components
If the temperature of the NTC-thermistor rises due to the heat dissipated by the LED, the
voltage on the NTC pin increases. When this voltage exceeds 0.56 V, the NTC_W bit in the
STATUS register is set to high, and the ATN pin is set to low to inform the microcontroller
that the LED is becoming hot. The NTC_W bit is cleared by reading the status register.
If the voltage on the NTC pin rises further and exceeds 1.2 V, the NTC_H bit in the status
register is set to high, and the ATN pin is set to low to inform the microcontroller that the LED
is too hot and the device goes automatically to the ready mode to avoid damaging the LED.
This status is latched, until the microcontroller reads the status register. Reading the
STATUS register clears the NTC_H bit.
The selection of the NTC and R
resistor values strongly depends on the power dissipated
X
by the LED and all components surrounding the NTC-thermistor and on the cooling
capabilities of each specific application. The R
and the NTC values in Tab le 1 below work
X
well in the demonstration board presented in this application note. A real application may
require a different type of NTC-thermistor to achieve optimal thermal protection.
The procedure to activate the NTC-feature is described in Section 5.2.
Table 1.Recommended components
ComponentManufacturerPart numberValueSize
C
I
C
O
LTDKVLF4014AT-1R5M1R8-11.5 µH3.7 x 3.5 x 1.4 mm
NTCMurataNCP21WF104J03RA100 kΩ0805
R
FL
R
TR
R
X
LEDLuxeon LEDLXCL-PWF10805
D1STMicroelectronicsSTPS1L20MF3.8x1.9x0.85 mm
(1)
D1
1. When the minimum application area is targeted, the BAT20J should be used, then the output current performance is
decreased.
The STCF06 is a powerful switching device where the PCB must be designed in line with
switched supplies design rules. The power tracks (or wires in the demonstration board) must
be as short as possible and wide enough, because of the large currents involved. It is
recommended to use a 4-layer PCB to get the best performance. All the external
components must be placed as close as possible to the STCF06. All high-energy switched
loops should be as small as possible to reduce EMI. Most of the LEDs need efficient
cooling, which could be done by using a dedicated copper area on the PCB. Please refer to
the selected LED's reference guide to design the heatsink. Place the RFL resistor as close
as possible to the PGND pins and the ground pin of the COUT capacitor. In case a
modification of any PCB layer is required, it is highly recommended to use enough vias.
Place the NTC resistor as close as possible to the LED for good temperature sensing. Direct
connection between GND and PGND is necessary in order to achieve correct output current
value. No LED current should flow through this track. Voltage sensing on the RFL resistor
must be done on a track from ball FB2 and directly connected to the R
current should flow through this track. Pin FB2S must be connected to the R
Vias connecting the STCF06 pins to the copper tracks (if used) must be 0.1 mm in diameter
for BGA version. It is recommended to use the filled vias.
resistor. Again, no
FL
resistor pin.
FL
3.2 PCB layout
3.2.1 A four-layer PCB with application area 55 mm2 for BGA package
Figure 3.Top layer
10/28
AN2730PCB design
Figure 4.Middle layer 1
Figure 5.Middle layer 2
Figure 6.Bottom layer
11/28
PCB designAN2730
Figure 7.Top overlay
12/28
AN2730Internal registers
4 Internal registers
4.1 Accessing the internal registers
There are 4 internal registers in the STCF06: COMMAND, DIMMING, AUX_LED, STATUS.
The STATUS register is read-only.
The COMMAND register can be accessed in any operation mode. All the other registers can
be accessed in any mode, except in shutdown mode. When the device enters shutdown
mode, the DIMMING, AUX_LED and status registers are cleared. The COMMAND register
value remains untouched when entering shutdown mode. The table below shows the
accessibility of each register in all operation modes.
Shutdown mode is entered after the Power-ON reset. This mode is mainly used to decrease
the power consumption of the device. During this mode, only the I
only thing which can be done in shutdown mode is to access the COMMAND register.
Entering shutdown mode by writing to the COMMAND register aborts any running operation
and clear the values of the DIMMING, AUX_LED and status registers. The COMMAND
register value is not affected by entering shutdown mode.
The following data must be written to the COMMAND register to enter shutdown mode.
Table 3.COMMAND register data to enter shutdown mode (version A)
PWR_ONTRIG_ENTCH_ONNTC_ONFTIM_3FTIM_2FTIM_1FTIM_0
CMD_REG
Table 4.COMMAND register data to enter shutdown mode (version B)
CMD_REG
0xxXxxxx
MSBLSB
PWR_ONTRIG_ENTCH_ONNTC_ONFTIM_3FTIM_2FTIM_1FTIM_0
0xx0xxxx
MSBLSB
2
C interface is alive. The
5.2 Shutdown mode with the NTC feature activated
When this operation mode is activated, the microcontroller can still monitor the NTC voltage
through its A/D converter, while STCF06 remains in shutdown mode and therefore saves
power.
The following data must be written to the COMMAND register to enter shutdown mode +
NTC.
Table 5.COMMAND register data to enter shutdown mode with NTC activated
PWR_ONTRIG_ENTCH_ONNTC_ONFTIM_3FTIM_2FTIM_1FTIM_0
CMD_REG
0xx1xxxx
MSBLSB
5.3 Ready mode and NTC
The ready mode allows the user to access all the internal registers. The NTC feature can be
activated in this mode and the temperature of the LED can be sensed by the A/D converter
of the microcontroller.
The following data must be written to the COMMAND register to enter ready mode.
14/28
AN2730Operation modes
Table 6.COMMAND register data to enter ready mode
PWR_ONTRIG_ENTCH_ONNTC_ONFTIM_3FTIM_2FTIM_1FTIM_0
CMD_REG
1000xxxx
MSBLSB
The following data must be written to the COMMAND register to activate the NTC feature.
Table 7.COMMAND register data to enter ready mode
PWR_ONTRIG_ENTCH_ONNTC_ONFTIM_3FTIM_2FTIM_1FTIM_0
CMD_REG
1001xxxx
MSBLSB
As soon as the NTC feature is activated, the internal switch connects the NTC resistor to the
resistor, thereby creating a voltage divider. The voltage on this divider can be, if desired,
R
X
monitored by the A/D converter of the microcontroller. An external voltage reference must be
connected to the NTC to use this feature. The bits NTC_W and NTC_H of the STATUS
register will not be properly set if there is no external reference voltage connected to the
NTC.
If the NTC feature is not going to be used, neither the negative thermistor, nor the external
reference needs to be connected. In this case, it is recommended to ground the RX pin. As
the NTC feature is automatically activated during the Flash and torch mode, leaving the R
pin floating could lead to unwanted interruptions of the light due to non-defined voltages on
the R
pin.
X
X
5.4 Torch mode
This mode is intended to be used for low light intensities. The LED current in TORCH mode
can be adjusted in a range from 29 mA up to 370 mA.
The torch mode is activated by writing the following data to the COMMAND register.
Table 8.COMMAND register data to enter torch mode
PWR_ONTRIG_ENTCH_ONNTC_ONFTIM_3FTIM_2FTIM_1FTIM_0
CMD_REG
101xxxxx
MSBLSB
The DIMMING register value (TDIM) must be set as well, unless it has already been set
during a previous operation. If TDIM register is not set, then the default output current value
is at the minimum.
There is no internal timer which controls the torch duration. Therefore, as soon as the torch
mode is activated, it remains active until a new mode is entered by writing a new data to the
COMMAND register.
If the torch mode has been terminated by entering ready or Flash mode, it can be restarted
again by writing the corresponding data to the COMMAND register only, because entering
any of the ready and Flash modes does not influence the TDIM value. If the torch mode was
15/28
Operation modesAN2730
terminated by entering into shutdown mode, then the TDIM value must be set again during
the restart of the torch because entering the shutdown mode clears the TDIM value.
As soon as the torch mode is activated, the NTC feature is automatically activated too in
order to protect the LED against overheating. The NTC feature is activated even if the
NTC_ON bit in the COMMAND register is set to zero.
5.5 Flash mode
This mode is intended to be used for high light intensities. The LED current in Flash mode
can be adjusted up to 1.5 A with the input voltage ranging from 3.5 V up to 5.5 V. The Flash
mode is activated by writing the following data to the COMMAND register.
Table 9.COMMAND register data to enter Flash mode
PWR_ONTRIG_ENTCH_ONNTC_ONFTIM_3FTIM_2FTIM_1FTIM_0
CMD_REG
11xxxxxx
MSBLSB
The DIMMING register value (FDIM) must be set as well, unless it has already been set
during a previous operation.
The activation of the Flash mode requires the TRIG pin to be high. The FLASH mode is
active only when both the TRIG_EN bit in the COMMAND register is set to 1 and the TRIG
pin is high. This gives the user the possibility to choose between soft and hard triggering of
the FLASH .
The soft triggering is done by writing data to the internal registers only, while the TRIG pin is
permanently kept high, for example by connecting it to V
. This saves one pin of the
BAT
microcontroller, which can be used for a different purpose, but this way of triggering is less
accurate than the hard one. The second disadvantage of this solution is that the Flash
duration can only be set in discrete increments of the internal timer ( increment = approx.
100 ms).
Hard-triggering of the Flash mode requires the microcontroller to manage the TRIG pin. The
COMMAND and the DIMMING registers are loaded with data before the TRIG pin is set to
high. This allows the user to avoid the I
2
C-bus latency. Flash mode then starts as soon as
the TRIG pin is set to high. It takes typically about 0.7 ms to ramp up the LED current to the
adjusted value. This time may vary according to the LED current value and the battery
voltage. When the TRIG pin is kept High long enough, the internal timer reaches zero and
the Flash mode is over. As soon as the Flash is timed out, the ATN pin is pulled down for
11 µs to inform the microcontroller that the status register has been updated and the flash is
over. If the TRIG pin is set to low before the internal timer reaches zero, the Flash mode will
be interrupted and can be restarted by setting the TRIG pin to high again. The internal timer
is paused while the TRIG pin is low. This means that the user can split the Flash into several
pulses of a total length equal to the FTIM value. Figure 8 shows how to split the Flash into
several shorter pulses. The cumulative length of all the pulses is determined by the FTIM
value.Figure 8shows the case for FTIM = 9 (900 ms Flash time). The cumulative time when
the TRIG pin is high is 1000 ms (5 pulses 200 ms long). The last Flash pulse is only 100 ms
long. The reason is that the internal Flash timer reaches zero and the TRIG_EN bit is set to
0.
16/28
AN2730Operation modes
Figure 8.Splitting the Flash pulse into several shorter pulses
1300 ms
100
200
ms
ms
9 8 7 6 5 4 3 2 1 0
Time when the
internal flash
timer reaches 0
I2C bus packet
TRIG_EN bit
TRIG pin
LED current
Internal Flash timer values
Hard triggering allows therefore a smooth setting of the Flash duration. The resolution is
about 8.8 µs. The minimum Flash duration is limited by the ramp-up time of the LED current
and the maximum is limited by the FTIM value. If it is necessary to make a flash pulse longer
than the maximum allowed by FTIM, then it is necessary to reload the COMMAND register
before the internal timer reaches zero (start a new Flash before the previous one elapses).
See Section 8.5 for more details.
17/28
The status register and the ATN pinAN2730
6 The status register and the ATN pin
6.1 The status register
Table 10.STATUS register bits
Bit nameN/AF_RUNLED_FNTC_WNTC_HOT_FOC_FVOUTOK_N
MSBLSB
A detailed description of each bit is also given in the STCF06 datasheet.
Table 11.Effect of the status register bits on the operation of the device
Bit name
Default value0000000
Latched (
Ready mode
when set
Sets ATN low
when set
(1)
Forces
F_RUN
(STAT_REG)
)NOYESYESYESYESNOYES
NOYESNOYESYESNOYES
NOYESYESYESYESNOYES
LED_F
(STAT_REG)
NTC_W
(STAT_REG)
NTC_H
(STAT_REG)
OT_F
(STAT_REG)
OC_F
(STAT_REG)
VOUTOK_N
(STAT_REG)
1. YES means that the bit is set by internal signals and is reset to its default value by an I2C-read operation of STAT_REG;
NO means that the bit is set and reset by internal signals in real-time.
When the status register is latched, reading and writing to the registers is still possible, but
the bits TRIG_EN and TCH_ON in the COMMAND register and AUXL register cannot be
changed, until the device is unlatched. It is necessary to read the STATUS register to
unlatch the device.
The ATN pin is also pulled down when the internal timer reaches zero in Flash mode. In this
case the ATN pin is pulled down for 11 µs only. It is recommended to connect the ATN pin to
the interrupt input of the microcontroller. If it is not connected to the interrupt input, the ATN
pin should be pulled fast enough not to miss the 11µs pulse, for example by a programming
loop which is entered after the start of the Flash mode. This loop runs until the ATN pin
becomes low. It is recommended to make a timeout of such a loop.
18/28
AN2730Reading and writing to the STCF06 registers through the I2C bus
7 Reading and writing to the STCF06 registers through
2
the I
7.1 Writing to a single register
Writing to a single register starts with a START bit followed by the 7-bit device address of
STCF06. The 8
operation. Then the master awaits an acknowledgement from STCF06. The 8-bit address of
the desired register is sent afterwards to STCF06. It is also followed by an acknowledge
pulse. The last transmitted byte is the data that is going to be written into the register. It is
followed again by an acknowledge pulse from STCF06. Then the master generates a stopbit and the communication is over, see Figure 9 below.
Figure 9.Writing to a single register
C bus
th
SDA LINE
bit is the R/W bit, which is 0 in this case. R/W = 1 means a Reading
DEVICE
ADDRESS
7 bits
M
S
S
T
A
B
R
T
W
R
I
T
E
L
R
S
/
B
W
A
C
K
ADDRESS OF
M
S
B
REGISTER
DATA
S
A
L
A
M
C
S
C
S
B
K
K
B
A
L
T
C
S
O
B
K
P
7.2 Writing to multiple registers with incremental addressing
It would be unpractical to send several times the device address and the address of the
register when writing to multiple registers. STCF06 supports writing to multiple registers with
incremental addressing. When data is written to a register, the register address is
automatically incremented (by one), and therefore the next data can be sent without sending
again the device address and the register address, see Figure 10 below.
Figure 10. Writing to multiple registers
W
DEVICE
R
ADDRESS OF
I
REGISTER i
T
E
M
A
L
R
S
C
S
/
B
K
B
W
DATA i
A
M
L
A
M
C
S
S
C
S
K
B
B
K
B
DATA i+1
A
L
M
C
S
S
K
B
B
DATA i+2
A
L
M
C
S
S
K
B
B
DATA i+2
A
L
M
C
S
S
K
B
B
DATA i+n
L
M
A
S
S
C
B
B
K
SDA LINE
ADDRESS
7 bits
M
S
S
T
A
B
R
T
S
A
L
T
C
S
O
K
B
P
19/28
Reading and writing to the STCF06 registers through the I2C busAN2730
7.3 Reading from a single register
The reading operation starts with a START bit followed by the 7-bit device address of
STCF06. The 8
th
bit is the R/W bit, which is 0 in this case. STCF06 confirms the receiving of
the address + R/W bit by an acknowledge pulse. The address of the register which should
be read is sent after and confirmed by an acknowledge pulse from STCF06 again. Then the
master generates a START-bit again and sends the device address followed by the R/W-bit,
which is 1 now. STCF06 confirms the receiving of the address + R/W-bit by an acknowledge
pulse, and starts to send data to the master. No acknowledge pulse from the master is
required after receiving the data. Then the master generates a STOP bit to terminate the
communication, see theFigure 11 below.
Figure 11. Reading from a single register
W
DEVICE
R
ADDRESS
7 bits
ADDRESS OF
I
REGISTER i
T
E
DATA i
DATA i+1
DATA i+2
DATA i+2
DATA i+n
SDA LINE
M
M
S
S
T
A
B
R
T
A
L
R
S
C
S
/
B
K
B
W
A
M
L
A
M
C
S
S
C
S
K
B
B
K
B
A
L
M
C
S
S
K
B
B
A
L
M
C
S
S
K
B
B
A
L
M
C
S
S
K
B
B
L
M
A
S
S
C
B
B
K
S
A
L
T
C
S
O
K
B
P
7.4 Reading from multiple registers with incremental addressing
Reading from multiple registers starts in the same way like reading from a single register. As
soon as the first register is read, the register address is automatically incremented. If the
master generates an acknowledge pulse after receiving the data from the first register, then
reading from the next register can start immediately without having to send once more the
device and the register addresses. The last acknowledge pulse before the STOP bit is not
required. See theFigure 12 below.
Figure 12. Reading from multiple registers
W
DEVICE
R
ADDRESS
7 bits
ADDRESS OF
I
REGISTER i
T
E
SDA LINE
M
S
S
T
A
B
R
T
A
L
M
R
C
S
S
/
K
B
B
W
20/28
DEVICE
R
ADDRESS
E
A
7 bits
D
A
L
S
C
S
T
A
K
B
R
T
R
/
W
DATA i
A
C
K
DATA i+1
A
L
M
C
S
S
K
B
B
DATA i+2
A
L
M
C
S
S
K
B
B
DATA i+2
A
L
M
C
S
S
K
B
B
DATA i+n
L
M
A
S
S
C
B
B
K
S
L
N
T
S
O
O
B
P
A
C
K
AN2730Examples of register setup for each mode
8 Examples of register setup for each mode
Table 12.Torch mode and Flash mode DIMMING registers settings
T_DIM
F_DIM
curren
t [mA]
al step
V
Sense
Resist.
Note:LED current values refer to RFL= 0.15 Ω, RTR = 1 Ω
Let's suppose that RFL = 0.15 Ω. The targeted value of the flash current is 1066 mA and the
flash duration should be 200 ms.
The reference voltage must be set to 160 mV to achieve a 1066 mA flash current with a
0.15 Ω sensing resistor. The value of FDIM (4 bits) must be set to 0xD to set up the
reference voltage to 160 mV (see Tab le 1 2).
The flash duration timer can be set to 100ms up to 1500 ms in 100ms increments. If the
desired flash duration is 200 ms the value FTIM (4 bits) must be set to 0x2.
●Bit PWR_ON of the COMMAND register must be set to 1
●Bit TRIG_EN of the COMMAND register must be set to 1
●Bit TCH_ON of the COMMAND register must be set to 0
●Bit NTC_ON of the COMMAND register can be set to any value, because NTC is
automatically ON when the Flash mode is active. Setting this bit to 0 does not switch off
the NTC.
Table 13.COMMAND register data to enter Flash mode
PWR_ONTRIG_ENTCH_ONNTC_ONFTIM_3FTIM_2FTIM_1FTIM_0
CMD_REG
11xX0010
MSBLSB
21/28
Examples of register setup for each modeAN2730
Table 14.DIMMING register data for the Flash mode
TDIM_3TDIM_2TDIM_1TDIM_0FDIM_3FDIM_2FDIM_1FDIM_0
DIM_REG
00001101
MSBLSB
It is necessary to write 4 bytes to the STCF06 to make a Flash.
Table 15.I2C data packet for activating the Flash mode
ByteHexBinaryComment
16201100010Device address + R/W bit
20000000000COMMAND register address
3D211010010 Data of the COMMAND register
40D00001101Data of the DIMMING register
8.2 Example 2: 48 mA torch
Let's suppose that RFL = 0.15 Ω, RTR = 1 Ω and the targeted value of the torch current is 48
mA.
The reference voltage must be set to 56 mV to achieve 48 mA in torch mode with the
resistor values mentioned above. The value of TDIM (4 bits) must be set to 0x3 to set up the
reference voltage to 56 mV.
●Bit PWR_ON of the COMMAND register must be set to 1.
●Bit TRIG_EN of the COMMAND register must be set to 1.
●Bit TCH_ON of the COMMAND register must be set to 0.
●Bit NTC_ON of the COMMAND register can be set to any value, because NTC is
automatically ON, when torch mode is active. Setting this bit to 0 does not switch off the
NTC.
Table 16.COMMAND register data for the torch mode
PWR_ONTRIG_ENTCH_ONNTC_ONFTIM_3FTIM_2FTIM_1FTIM_0
CMD_REG
10110000
MSBLSB
Table 17.DIMMING register data for the torch mode
TDIM_3TDIM_2TDIM_1TDIM_0FDIM_3FDIM_2FDIM_1FDIM_0
DIM_REG
00110000
MSBLSB
It is necessary to write 4 bytes to the STCF06 to run the torch mode.
22/28
AN2730Examples of register setup for each mode
Table 18.I
ByteHexBinaryComment
16201100010Device address + R/W bit
20000000000COMMAND register address
3B010110000 Data of the COMMAND register
43000110000Data of the DIMMING register
2
C data packet for activate torch mode
The duration of the torch mode is "unlimited". Torch mode is terminated by setting the
TCH_ON bit in the COMMAND register to 0.
Termination of the torch mode can be done by writing the following data to STCF06.
Table 19.I2C data packet for terminating the torch mode
ByteHexBinaryComment
16201100010Device address + R/W bit
20000000000COMMAND register address
38010000000 Data of the COMMAND register
This puts the STCF06 into ready mode.
8.3 Example 3: an auxiliary LED running at 10 mA for 500 ms
STCF06 must be into ready mode (both bits TRIG_EN and TCH_ON are 0) to activate the
auxiliary LED.
A 10 mA output current is reached when AUXI is set to 0x8. AUXT must be set to 0x5 to
have a 500 ms duration of the auxiliary LED lighting.
Writing the 3 bytes in Ta b le 2 2 to STCF06 puts it into ready mode. This can be skipped if it
already is in ready mode.
23/28
Examples of register setup for each modeAN2730
Table 22.I
ByteHexBinaryComment
16201100010Device address + R/W bit
20000000000COMMAND register address
38010000000 Data of the COMMAND register
2
C data packet for activating the ready mode
Writing the following 3 bytes to STCF06 activates the auxiliary LED for the desired time.
Table 23.I2C data packet for activating the AUX_LED
ByteHexBinaryComment
16201100010Device address + R/W bit
20200000010Auxiliary LED register address
38510000101 Data of the auxiliary LED register
8.4 Example 4: red-eye reduction (multiple short flashes)
There are two ways to manage this task. The first one is to use hardware triggering of the
flashes through the TRIG pin. This is the most suitable and recommended solution, as it
reduces the usage of the I
continuously. The second solution is to use the software triggering feature, which means a
periodical reloading of the COMMAND register. This however increases traffic on the I
bus and the flashes can only have length adjustable in 100 ms increments only.
2
C bus and the length of each flash pulse can be adjusted
2
C
Let's suppose that R
= 0.15 Ω and the targeted value of the flash current is 1066 mA. The
FL
task is to make 5 flashes of 100 ms duration with a 100 ms pause between each.
The setting of the reference voltage is identical to the one in Section 8.1.
The Flash timer (FTIM) is set to 0xF, which represents 1.5 s.
Table 24.COMMAND register data for Flash mode
PWR_ONTRIG_ENTCH_ONNTC_ONFTIM_3FTIM_2FTIM_1FTIM_0
CMD_REG
11011111
MSBLSB
Table 25.DIMMING register data for Flash mode
TDIM_3TDIM_2TDIM_1TDIM_0FDIM_3FDIM_2FDIM_1FDIM_0
DIM_REG
00001101
MSBLSB
The data packet which has to be sent is given in Ta bl e 2 6.
24/28
AN2730Examples of register setup for each mode
Table 26.I
2
C data packet for activating the Flash mode
ByteHexBinaryComment
16201100010Device address + R/W bit
20000000000COMMAND register address
3DF11011111 Data of the COMMAND register
40D00001101Data of the DIMMING register
Figure 13 shows the TRIG pin and the I2C bus timings.
Figure 13. Multiple flashes handled by the TRIG pin
I2C bus packet
TRIG_EN bit
TRIG pin
100
100
ms
100
ms
ms
100
ms
100
ms
900 ms
100
ms
100
ms
100
ms
100
ms
8.5 Example 5: a Flash pulse longer than 1.5 s
Let's suppose that RFL = 0.15 Ω and the targeted value of the flash current is 630 mA. The
task is to make a single flash pulse with a 4-second duration.
It is necessary to reload FTIM in the COMMAND register before the internal flash timer
reaches zero. This guarantees that the Flash continues and does not stop after 1.5 sec.
The first packet must contain also the DIMMING register data, if they are different from
those which were used in the previous operation.
●Packet 1
Sets Flash mode with 1.5 s duration and the proper DIMMING.
Table 27.I2C data packet for activating the Flash mode
ByteHexBinaryComment
16201100010Device address + R/W bit
20000000000COMMAND register address
3AF10101111 Data of the COMMAND register
40D00001010Data of the DIMMING register
25/28
Examples of register setup for each modeAN2730
●Packet 2
Sets Flash mode with 1.5 s duration. DIMMING is not set again as it is same as before
Table 28.1
ByteHexBinaryComment
16201100010Device address + R/W bit
20000000000COMMAND register address
3AF10101111 Data of the COMMAND register
st I2
C data packet to restart the Flash mode
●Packet 3
Sets Flash mode with 1.5 s duration. DIMMING remains untouched again.
Table 29.2nd I2C data packet to restart of the Flash mode
ByteHexBinaryComment
16201100010Device address + R/W bit
20000000000Command register address
3AF10101111 Data of the COMMAND register
●Packet 4
Sets Flash mode with 1 s duration. DIMMING remains untouched again.
Table 30.3rd I2C data packet to restart of the Flash mode
ByteHexBinaryComment
16201100010Device address + R/W bit
20000000000COMMAND register address
3AA10101010 Data of the COMMAND register
Please refer toFigure 14 for more details about the I
2
C-bus packets timing.
The solution described above is using a software termination of the Flash pulse. (It is timed
out by the internal timer.) The Flash pulse could be also terminated by setting the TRIG pin
to low after 4 seconds. In this case, the fourth packet could be the same as packets 2 and 3
because the timing of the Flash is done by the TRIG pin and it is not necessary to change
the value of FTIM in the COMMAND register.
This way of periodical reloading of the COMMAND register can be used to achieve a
continuous Flash light. In this case, it is very strongly recommended to guarantee an
efficient cooling of both the LED and the chip, otherwise the light can be interrupted by
activation of the thermal protections.
26/28
AN2730Revision history
p
Figure 14. I2C bus packets timing for a Flash lasting longer than FTIM max
Timeout of the
first Flash
1.5s
1.0s 1.0s1.0s 1.0s
Timeout of the
second Flash
1.5s
4.0s
9 Revision history
Table 31.Document revision history
DateRevisionChanges
30-Apr-20081Initial release
Timeout of the
third Flash
1.5s
1.0s
Timeout of the
fourth Flash –
ending of the
whole Flash
ulse
I2C bus packets
TRIG_EN bit
TRIG pin
27/28
AN2730
Please Read Carefully:
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the
right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any
time, without notice.
All ST products are sold pursuant to ST’s terms and conditions of sale.
Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no
liability whatsoever relating to the choice, selection or use of the ST products and services described herein.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this
document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products
or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such
third party products or services or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED
WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS
OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT
RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING
APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY,
DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE
GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void
any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any
liability of ST.
ST and the ST logo are trademarks or registered trademarks of ST in various countries.
Information in this document supersedes and replaces all information previously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.