Skip to content

Commit 0e37c2b

Browse files
committed
drivers: led: ltc3220: add README Documentation for LTC3220
Added driver documentation for LTC3220 LED driver Signed-off-by: Jan Carlo Roleda <[email protected]>
1 parent e92a0e8 commit 0e37c2b

File tree

3 files changed

+133
-1
lines changed

3 files changed

+133
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. include:: ../../../../../drivers/led/ltc3220/README.rst

doc/sphinx/source/projects_doc.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,12 @@ GYROSCOPES
9898
:maxdepth: 1
9999
:glob:
100100

101-
projects/gyroscope/*
101+
projects/gyroscope/*
102+
103+
LED
104+
============
105+
.. toctree::
106+
:maxdepth: 1
107+
:glob:
108+
109+
projects/led/*

drivers/led/ltc3220/README.rst

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
LTC3220 no-OS driver
2+
====================
3+
4+
.. no-os-doxygen::
5+
6+
Supported Devices
7+
-----------------
8+
9+
`LTC3220 <https://www.analog.com/en/products/ltc3220.html>`_
10+
11+
Overview
12+
--------
13+
14+
The LTC3220 is a highly integrated multi-display LED drivers.
15+
These parts contain a high efficiency, low noise charge pump to provide power
16+
to up to eighteen universal LED current sources. The LED currents are set by
17+
an internal precision current reference. Independent dimming, on/off,
18+
blinking and gradation control for all universal current sources is achieved
19+
via the I2C serial interface. 6-bit linear DACs are available to adjust
20+
brightness levels independently for each universal LED current source.
21+
22+
The LTC3220 charge pump optimizes efficiency based on the voltage
23+
across the LED current sources. The part powers up in 1x mode and
24+
will automatically switch to boost mode whenever any enabled LED current source
25+
begins to enter dropout. The first dropout switches the parts into 1.5x mode
26+
and a subsequent dropout switches the LTC3220 into 2x mode. The parts reset to
27+
1x mode whenever a data bit is updated via the I2C port.
28+
29+
There are two I2C addresses available. The LTC3220 I2C address is 0011100
30+
and the LTC3220-1 I2C address is 0011101. The I2C address is the only difference
31+
between the LTC3220 and LTC3220-1.
32+
33+
Applications
34+
------------
35+
36+
* Video Phones with QVGA+ Displays
37+
* Keypad Lighting
38+
* General/Miscellaneous Lighting
39+
40+
LTC3220 Device Configuration
41+
----------------------------
42+
43+
Driver Initialization
44+
---------------------
45+
46+
In order to be able to use the device, you will have to provide the support for
47+
the communication protocol (SPI) as mentioned above.
48+
49+
The first API to be called is **ltc3220_init**. Make sure that it returns 0,
50+
which means that the driver was initialized correctly.
51+
52+
After successful initialization, it is recommended to perform a device reset by
53+
calling **ltc3220_reset** in order to put the device in a known initial state,
54+
where all the registers on the device are reset to 0.
55+
56+
ULED Configuration
57+
-----------------
58+
59+
Each of the 18 LEDs are individually configurable to a specific mode
60+
of operation and adjustable current output, using a 6-bit DAC
61+
to provide 64 levels of resolution from 0mA to 20mA.
62+
63+
The supported modes of operation are:
64+
65+
1. Normal - provides a current output for an LED attached to its pins.
66+
2. Blinking - performs a blinking operation with configurable period and
67+
rise time in the Blink Configuration
68+
3. Gradation - performs a gradation to gradually adjust the current provided to
69+
the output, configurable to rising or falling and adjusting its ramp time and
70+
period.
71+
4. General Purpouse Output (GPO) - Configures the output to run in current
72+
limited mode or as a strong pull-down output if the output current is 0mA.
73+
74+
The ULED registers can be updated by using **ltc3220_set_uled_mode** and
75+
**ltc3220_set_uled_current**, or together in the respective ULEDs' register via
76+
**ltc3220_update_reg_uled**, where the 2 upper bits written correspond to the
77+
mode of operation, and the 6 lower bits are for the DAC.
78+
79+
If the device command register has quick write set, writing a mode and current
80+
output level on ULED1 will perform a parallel write to all ULED outputs.
81+
82+
Device Command Configuration
83+
----------------------------
84+
85+
The device can be forced to operate on a specific charge pump configuration, be
86+
written to in parallel through ULED1, and be shutdown while maintaining the
87+
latest device configuration registers. This can be set individually via
88+
**ltc3220_set_quick_write**, **ltc3220_set_cpo_1x**, **ltc3220_set_cpo_1p5x**,
89+
**ltc3220_set_cpo_2x**, **ltc3220_set_shutdown**, or directly to the register
90+
via **ltc3220_update_reg_command**, where the 4 lower bits of the register
91+
corresponds to the above set configurations, according to the
92+
device's datasheet.
93+
94+
Blink Configuration
95+
-------------------
96+
97+
The blinking mode of operation for ULED outputs can be configured to have a
98+
longer blinking period and a faster rise time in current. These can be
99+
configured with **ltc3220_set_blink_fast** and **ltc3220_set_blink_long**, or
100+
together in the Blink and Gradation Configuration register via
101+
**ltc3220_update_reg_blink_grad**. Note that this also configures
102+
the gradation configuration as they share the same configuration register.
103+
104+
Gradation Configuration
105+
-----------------------
106+
107+
The gradation mode of operation for ULED outputs can be configured to increase
108+
or decrease in brightness by gradually adjusting the current output based on an
109+
internal counter. This counter resets to its maximum when set to decreasing, and
110+
resets to its minimum when set to increasing. This can be set by using
111+
**ltc3220_set_grad_increasing**.
112+
113+
Note that in increasing gradation, the counter remains at its maximum if another
114+
LED is set to gradation mode. The newly set LED will immediately appear with its
115+
maximum current and will not rise towards it.
116+
117+
The ramp time and period of gradation is also configurable from disabling
118+
gradation to a ramp time of 0.96s to 0.24s and a period of 1.25s to 0.313s,
119+
set by using **ltc3220_set_grad_speed**.
120+
121+
Alternatively these can be set together in the Blink and Gradation Configuration
122+
register via **ltc3220_update_reg_blink_grad**. Note that this also configures
123+
the blink configuration as they share the same configuration register.

0 commit comments

Comments
 (0)