Application Note 111 July 2007 LTC3219 User's Guide: Table 1. Features of LTC3219

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Application Note 111

July 2007
LTC3219 Users Guide
by Marty Merchant
INTRODUCTION
The LTC3219 is a 250mA LED driver which illuminates
9 Universal LEDs (ULEDs). The ULEDs are considered
universal because they may be individually turned on or
off, set in general purpose output (GPO) mode, set to blink
at a selected on-time and period, or gradate on and off at
a selected gradation rate. This device also has an external
enable (ENU) pin that may be used to blink, gradate, or turn
on/off the LEDs without using the I2C bus. This may be
useful if the microprocessor is in sleep or standby mode.
If used properly, these features may save valuable memory
space, programming time, and reduce I2C trafc.
I2C Control
The LTC3219 has 12 data registers, each with its own subaddress as shown in Table 2. The data is loaded into the
registers when the device receives a Stop bit. This device
is written using the standard I2C protocol. A 7-bit slave

address and Write bit is followed by the 8-bit sub-address


byte and an 8-bit data byte.
The LTC3219 is a slave I2C device that only can receive
data.
DATA BYTES
REG0 (Tables 3 and 4) is used to set the charge pump to
Auto, Force 1x, Force 1.5x, or Force 2x modes. It is also
used to prepare for a Quick Write, or set the gradation UP
bit. REG1 through REG9 set the intensity and mode for the
nine individual ULEDs (Table 5). REG10 is used to select
ULED1 to ULED8 for ENU control, as shown in Table 6.
REG11 is separated into three portions as illustrated in
Table 7. D0 is used to select ULED9 for ENU control. D1
and D2 are used to control the gradation time, while D3 and
D4 are used to select the blinking on-time and period.
, LT, LTC and LTM are registered trademarks of Linear Technology Corporation.
All other trademarks are the property of their respective owners.

Table 1. Features of LTC3219


FEATURE

BENEFITS

9 Separate 28mA Current Sources

9 Individually Controlled LEDs

Blink Mode

Blinks One of Four Blinking Patterns

GPO Mode

I2C Controlled Open Drain Drivers

Gradation

Gradually Turns On and Off LEDs

External Enable

Controls LEDs with Single Input

Auto Switching Charge Pump

Automatically Switches to 1x, 1.5x, or 2x Modes for Better Efciency

Forced Charge Pump Mode

Can Be Programmed to Remain in 1x, 1.5x or 2x Mode

an111f

AN111-1

Application Note 111


Table 2. Sub-Address Byte
MSB

LSB

Register

REG0

REG1

REG2

REG3

REG4

REG5

REG6

REG7

REG8

REG9

REG10

REG11

X = Dont Care

Table 3. REG0, Command Byte


MSB

LSB

D7

D6

D5

D4

D3

D2

D1

D0

Reserved

Reserved

Reserved

Reserved

Force2x

Force1p5

Quickwrite

UP

Table 4. Command Byte Bit Functions


UP

0
1

Gradation Counts Down


Gradation Counts Up

Quickwrite

0
1

Normal Write to Each Register


Quick Write, REG1 Data is Written to All 12 Universal Registers

Force1p5

1
0

Forces Charge Pump Into 1.5x Mode


Enables Mode Logic to Control Mode Changes Based On Dropout Signal

Force2x

1
0

Forces Charge Pump Into 2x Mode


Enables Mode Logic to Control Mode Changes Based On Dropout Signal
D2 (Force1p5x) = 1
D3 (Force2x) = 1

Force1x
Reserved

Reserved

Reserved

Reserved

} Forces Charge Pump Into 1x Mode

an111f

AN111-2

Application Note 111


Table 5. REG1 to REG9, Universal LED
BLINK/GRADATION/DROPOUT ENABLED

LED CURRENT DATA

MSB

LSB

Bits

D7

D6

D5

D4

D3

D2

D1

D0

Normal
Blink Enabled
Gradation Enabled
GPO Mode

0
0
1
1

0
1
0
1

D5
D5
D5
D5

D4
D4
D4
D4

D3
D3
D3
D3

D2
D2
D2
D2

D1
D1
D1
D1

D0
D0
D0
D0

Table 6. REG10, Lower ENU Control Bits


MSB

LSB

D7

D6

D5

D4

D3

D2

D1

D0

ULED8

ULED7

ULED6

ULED5

ULED4

ULED3

ULED2

ULED1

Table 7. REG11, Gradation, Blink Times, Upper ENU Control Bits


BLINK TIMES AND PERIOD

UPPER ENU
CONTROL BIT

GRADATION TIMES

D4

D3

Blink

Period

D2

D1

Gradation

D0

0
0
1
1

0
1
0
1

0.625s
0.156s
0.625s
0.156s

1.25s
1.25s
2.5s
2.5s

0
0
1
1

0
1
0
1

Disabled
0.24s
0.48s
0.96s

ULED9

an111f

AN111-3

Application Note 111


DEVICE SET UP AND OPERATION
Although the Power on Reset clears all the data registers,
it is good practice to write zeros to all the data registers
to make sure all data registers are reset after VBAT is
powered up. DVCC may be used to reset the registers by
holding DVCC low until VBAT completes power. The Quick
Write feature may also be used to clear the ULED registers
simultaneously with fewer I2C writes.
To set one or more ULED(s) using the I2C bus, write the
intensity setting to the desired ULED registers followed
by a Stop bit. The following example illustrates how to set
ULED1 and ULED2 to 5mA. Since the full-scale current is
28mA, use the following formula to determine the number
of steps needed to acquire 5mA.
Steps = ILED StepsFullScale/IFullScale
5mA 63Steps/28mA = 11.25 Steps

charge pump to change modes (drop-out). For low speed


applications, the GPO current setting should be set greater
than the maximum current needed, however setting the
current greater than 10 times the maximum current may
increase the quiescent current by more than 10%.
Example 2: Set ULED1 and ULED2 to 1mA in
GPO mode
S 36H 01H C2H

Set ULED1 to 1mA in GPO mode

S 36H 02H C2H P Set ULED2 to GPO mode, Stop


bit loads data
Blinking LEDs may be used to indicate voicemail messages, missed calls, low battery, or other messages. The
LTC3219 has a blinking feature that allows the user to
choose between one of four different blinking rates. This
feature reduces processor time and I2C trafc. To set a
ULED to blink:

The number of steps is rounded to 11 and converted to


the hexadecimal value 0BH. Setting the ULED register to
0BH will set the ULED to approximately 5mA.

1) Set the blinking rate in REG11.

Example 1: Setting ULED1 and ULED2 to 5mA

The blink rate may be changed at any time by changing


the blink times and period bits in register 11.

S 36H 01H 0BH

Set ULED1 to 5mA, No Stop bit

S 36H 02H 0BH P Set ULED2 to 5mA, Stop bit


loads data
In Example 1, the S designates the Start Bit and 36H
designates the 7-bit slave address plus the Write bit to
form the 8-bit hexadecimal byte of 36. The second hexadecimal bytes, 01 and 02, are the sub-address bytes. The
third hexadecimal byte is the register data byte. The P
designates the Stop bit. The Stop bit was set after the last
write to load the ULED1 and ULED2 registers and set the
LEDs simultaneously. A Stop bit may be used after each
I2C write except where specied when gradating. All of
the following examples will use the same format used in
Example 1.
The GPO mode may be used as an open drain output to
drive some other device. This is accomplished by allowing the ULED pin to be driven to 0V without causing the

2) Set the ULED register with the desired intensity and the
blinking bit set, followed by a Stop bit.

Example 3: Setting ULED1 and ULED2 to blink at 5mA


with a 2.5s period and a 0.625s on-time:
S 36H 0BH 10H

Set blinking time to 0.625s on,


2.5s period

S 36H 01H 4BH

Set ULED1 to blink at 5mA

S 36H 02H 4BH P Set ULED2 to blink, Stop bit


loads all data
It is sometimes desirable to gradually turn on and off
LEDs or displays. Normally it uses a lot of I2C bus time
to gradually turn on and off LEDs smoothly. The LTC3219
has a gradation feature that allows the user to smoothly
turn on and off LEDs with little I2C interaction. Gradation
may be controlled with the I2C bus or by the ENU pin only
when the I2C bus is not controlling the device. To gradate

an111f

AN111-4

Application Note 111


a ULED from the off to on state via the I2C bus, the following procedure must be followed in order to achieve
the proper results.
1) Clear the Up bit in REG0 followed by a Stop bit.
2) Set the gradation time in REG11 without a Stop bit.
3) Set the ULED register with the Gradation bit set and
without a Stop bit.
4) Set the Up bit in REG0 followed by a Stop bit.
The Stop bit loads the registers and starts the gradation
process. Never have the ULED Gradation bit set without
the Gradation Timer enabled. This is an invalid state and
may cause undesirable results.
Example 4: Start gradating ULED1 and ULED2 from
0mA to 5mA at 0.48s ramp time:
S 36H 00H 00H P Clear Up bit to prepare
gradation ramp
S 36H 0BH 04H

Set Gradation time, no Stop bit

S 36H 01H 8BH

Set ULED1 to gradate to 5mA,


no Stop bit

S 36H 02H 8BH

Set ULED2 to gradate to 5mA,


no Stop bit

S 36H 00H 01H P Set Up bit, Stop bit starts


gradation
Prior to disabling the gradation timer in register 11 or
gradating up any other ULEDs, the gradation bits in the
ULED register must be cleared. This is accomplished by
writing an intensity value with the gradation bit cleared.
Example 5: Disabling gradation timer with ULED1 and
ULED2 at 5mA
S 36H 01H 0BH

Set ULED1 to 5mA with


gradation bit low

S 36H 02H 0BH

Set ULED2 to 5mA with


gradation bit low

S 36H 0BH 00H P Disable gradation, Stop bit


loads all data

The ULEDs may be set to gradate off from an on state.


To do this:
1) Clear the Up bit in REG0.
2) Set the ULED with the current intensity and the
Gradation bit set without a Stop bit.
3) Enable the Gradation Timer followed by a Stop bit.
4) Set the ULED intensity to 0 with the Gradation bit set.
Step 4 must be completed before the gradation ramp
completes or the ULEDs will icker at a low intensity. If
all ULEDs and charge pump are off, then the part will go
into shutdown.
Example 6: Start gradating ULED1 and ULED2 from
5mA to 0mA
NOTE: These steps must be completed within the gradation time.
S 36H 00H 00H P Clear Up bit
S 36H 01H 8BH

Set ULED1 with gradation bits,


no Stop bit

S 36H 02H 8BH

Set ULED2 with gradation bits,


no Stop bit

S 36H 0BH 04H P Set gradation timer, Stop bit


starts gradation
S 36H 01H 80H

Set ULED1 & ULED2 registers


to 0 with gradation bit set

S 36H 02H 80H P Stop bit loads data


The ULED gradation bit must be cleared before the
gradation timer in register 11 is disabled.
It may be desired to continuously gradate a ULED up and
down. This may be achieved by rst initiating the gradation as in Example 4 or Example 6, then change the ULED
intensity and Up bit accordingly. To gradate down after
gradating up as illustrated in example 4:
1) Clear the Up bit followed by a Stop bit. This starts the
ULEDs gradating down.
2) Clear the ULED registers with the gradation bit set.

an111f

AN111-5

Application Note 111


Example 7: Continue gradating down after gradating
up as illustrated in Example 4
S 36H 00H 00H P Clear Up bit, Stop bit starts
gradation ramp down
S 36H 01H 80H

Set ULED1 register to 0 with


gradation bit set

S 36H 02H 80H P Set ULED2 to 0, Stop bit


loads data
To gradate back up again:
1) Set the ULED intensity with the gradation bit set and
without a Stop bit.
2) Set the Up bit in REG0 followed by a Stop bit.
This starts the ULEDs gradating up.
Example 8: Continue gradating ULED1 and ULED2
back up to 5mA after gradating down

This feature may also be used to start all the ULEDs blinking or gradating. To gradate all ULEDs up using the Quick
Write feature:
1) Set the Quick Write bit and clear the Up bit in REG0
followed by a Stop bit.
2) Set REG1 gradation bit to the desired intensity without
a Stop bit.
3) Set the gradation time in REG11 without a Stop bit.
4) Clear the Quick Write bit and set the Up bit in REG0
followed by a Stop bit.
The Stop bit starts the gradation ramp.
Example 10: Start gradating all ULEDs up from 0mA to
5mA using the Quick Write feature
S 36H 00H 02H P Set the Quick Write bit, Clear
the Up bit

S 36H 01H 8BH

Set ULED1 to gradate to 5mA, no


Stop bit

S 36H 01H 8BH

Set ULEDs to gradate to 5mA,


no Stop bit

S 36H 02H 8BH

Set ULED2 to gradate to 5mA,


no Stop bit

S 36H 0BH 04H

Set the gradation time,


no Stop bit

S 36H 00H 01H P Set Up bit, Stop bit starts


gradation
There may be times when all the ULEDs need to be changed
to the same value simultaneously. The LTC3219 has a
Quick Write feature that allows all the ULED registers
to be loaded at the same time. This is done by setting
the Quick Write bit in REG0 and then writing the desired
value in REG1.
Example 9: Clearing all ULED registers using the
Quick Write feature
S 36H 00H 02H

Set the Quick Write bit

S 36H 01H 00H P Clear all ULEDs with Stop bit


S 36H 00H 00H P Clear Quick Write bit

S 36H 00H 01H P Clear Quick Write bit, Set Up bit,


Gradation starts
The Quick Write feature is especially useful when gradating
down all ULEDs simultaneously. This feature may reduce
the number of I2C writes from twenty times to ve times. To
gradate all ULEDs down using the Quick Write feature:
1) Set the Quick Write bit and clear the Up bit in REG0.
2) Set REG1 gradation bit with the present intensity
setting without a Stop bit. This sets up all ULEDs to
gradate down.
3) Set the gradation time in REG11 followed by a Stop bit.
This starts all ULEDs gradating down.
4) Set REG1 gradation bit with 0mA intensity. This allows the
part to go into shutdown when gradation is
completed.
5) Clear the Quick Write bit in REG0.
This prepares the part for other operations.

an111f

AN111-6

Application Note 111


Example 11: Start gradating all ULEDs down from
5mA to 0mA using the Quick Write feature
S 36H 00H 02H
S 36H 01H 8BH

Set the Quick Write bit, Clear the


Up bit
Set ULEDs to gradate from 5mA,
no Stop bit

S 36H 0BH 04H P Set gradation time, Stop bit


starts gradation
S 36H 01H 80H P Set all ULED registers to 0 with
gradation bit set
S 36H 00H 00H P Clear Quick Write bit
ENU Control

S 36H 01H 4BH

Set ULED1 to blink at 5mA

S 36H 02H 4BH P Set ULED2 to blink, Stop bit


loads data
Set ENU pin to DVCC to initiate ULED1 and ULED2
blinking.
The ENU pin may also be used to control gradation, however it is important that all other ULEDs remain off and
that the charge pump remains in auto mode (not forced
to any mode) to allow the part to go into shutdown and
to operate properly. This mode may be initiated with the
ULEDs in the on or off states, but care must be taken not
to turn on any other LEDs or change the charge pump
from auto mode once gradation with ENU control is set.
To gradate on with the ENU pin:

Many battery devices go into a standby or sleep mode


when not in use. It may be necessary to alert the user of
events while keeping the microprocessor in standby mode.
The ENU pin on the LTC3219 allows the user to set ULEDs
in normal, GPO, blinking, or gradation modes without the
use of the I2C bus. The ENU pin is intended to be used
when I2C control is not preferred, however the I2C may be
used to drive other ULEDs as long as the gradation timer
remains disabled. To control a ULED via the ENU pin in
normal, GPO, or blinking modes:

1) Make sure all ULEDs are off, the charge pump is in


auto mode, and the ENU pin is set to 0V. The Quick
Write feature may be used to clear all ULEDs quickly.

1) Set the ENU pin to the desired state, high if LEDs are
on or low if LEDs are off.

The ULEDs are now set to gradate using ENU control. Set
the ENU pin to DVCC to gradate up and to 0V to gradate
down.

2) Set the ENU control bits and set the blinking time, if
required, in REG10 and/or REG11.
3) Set the ULED intensity with the desired control bits
followed by a Stop bit.
Example 12: Setting ULED1 and ULED2 to blink at
0.625s on for a period of 2.5s with ENU control
Set ENU pin to 0V Starting with ULEDs off
S 36H 0AH 03H
S 36H 0BH 10H

2) Select the desired ULEDs for ENU control in REG10


and/or REG11.
3) Set the gradation time followed by a Stop bit.
4) Set the ULEDs intensity with the gradation bit set
followed by a Stop bit.

Example 13: Gradate ULED1 and ULED2 to 5mA using


ENU control at 0.48s
Set ENU pin to 0V Start with ULEDs off
S 36H 00H 02H P Set the Quick Write bit
S 36H 01H 00H P Clear all ULEDs
S 36H 00H 00H

Set ULED1 & ULED2 for ENU


control

Clear command register, charge


pump=Auto

S 36H 0AH 03H

Set blinking time to 0.625s on,


2.5s period

Set ULED1 and ULED2 for ENU


control

S 36H 0BH 04H P Set gradation time for 0.48s

an111f

Information furnished by Linear Technology Corporation is believed to be accurate and reliable.


However, no responsibility is assumed for its use. Linear Technology Corporation makes no representation that the interconnection of its circuits as described herein will not infringe on existing patent rights.

AN111-7

Application Note 111


S 36H 01H 8BH

Set ULED1 to gradate to 5mA

S 36H 02H 8BH P Set ULED2 to gradate to 5mA

2) Set the ULEDs to be controlled to the desired value with


the gradation bit clear.

Set ENU pin to DVCC to gradate up and to 0V to gradate


down.

3) Set the gradation timer and the ENU control bits in


REG11 and/or REG10 followed by a Stop bit.

Before any other ULEDs are turned on, the ENU with
gradation must be disabled. To do this:

4) Wait for the gradation ramp to nish.

1) Set the ENU pin in the desired state to have ULEDs


on or off.
2) Clear the ENU control bits without a Stop bit.
3) Clear the gradation timer bits without a Stop bit.
4) Set the ULED registers to the desired intensity and
the gradation bit low followed by a Stop bit after the
last write.
Example 14: Disabling ENU and gradation control
while ULED1 and ULED2 are set to 5mA

5) Set the ULED registers with the desired intensity and


the gradation bit set.
The ULEDs will now gradate down and up under ENU
control.
Example 15: Gradating ULED1 and ULED2 from 5mA
with ENU control
Set ENU pin to DVCC Start ENU control from ON state
Turn off all ULEDs that are not going to be under ENU
control
S 36H 00H 00H

Clear Command Register,


Charge pump=Auto
Set ULED1 to 5mA

Set ENU pin High

Gradate ULEDs to on state

S 36H 0AH 00H

Relinquish ENU control

S 36H 01H 0BH

S 36H 0BH 00H

Disable gradation timer,


no Stop bit

S 36H 02H 0BH P Set ULED2 to 5mA

S 36H 01H 0BH

S 36H 0AH 03H

Clear ULED1 gradation bit, set


to 5mA, no Stop bit

S 36H 02H 0BH P Stop bit loads data


simultaneously

Set ULEDs 1 and 2 for


ENU control

S 36H 0BH 04H P Set gradation ramp up at 0.48s


Wait for gradation ramp to nish before setting ULED
gradation bits.

Gradation with ENU may also be initiated with the ULEDs


to be controlled in the on state. To do this, the gradation
ramp must rst be ramped up and the ENU pin must be
high. To set ULEDs to gradate with ENU control from the
on state:

S 36H 01H 8BH

Set ULED gradation bit and


intensity

S 36H 02H 8BH P Stop bit enables gradation with


ENU control

1) Make sure all ULEDs that are not going to be ENU


controlled are off, the charge pump is in auto mode,
and the ENU pin is set to DVCC.

an111f

AN111-8

Linear Technology Corporation

LT 0707 PRINTED IN USA

1630 McCarthy Blvd., Milpitas, CA 95035-7417


(408) 432-1900 FAX: (408) 434-0507

www.linear.com

LINEAR TECHNOLOGY CORPORATION 2007

You might also like