How does it work?
LED Driver 9 Click as its foundation uses the TLC59116, an I2C bus controlled 16-channel LED driver optimized for red/green/blue/amber (RGBA) color mixing and backlight application from Texas Instruments. It operates within a VCC supply voltage range where its outputs are 17V tolerant. Each LED output, 16 LED drivers presented on two 2×5 male headers, with a maximum output current of 120mA per channel, is programmable at OFF and ON state, has programmable individual LED brightness with group dimming and blinking.
Each LED output has its individual PWM controller, which allows each LED to be set at a specific brightness value. An additional 8-bit resolution (256 steps) group PWM controller has a fixed frequency of 190Hz and an adjustable frequency between 24Hz to once every 10.73 seconds, with an adjustable duty cycle from 0% to 99.6%.
LED Driver 9 Click communicates with MCU using standard I2C 2-Wire interface, with a clock frequency up to 100kHz in the Standard, 400kHz in the Fast, and 1MHz in the Fast Mode Plus. The Software Reset feature allows the MCU to perform a reset of the TLC59116 through the I2C bus, identical to the Power-On Reset (POR) that initializes the registers to their default state, causing the outputs to be set high, which means that the LEDs are OFF. This allows an easy and quick way to reconfigure all device registers to the same condition. Also, this Click board™ has a Reset pin routed to the RST pin on the mikroBUS™ socket, which holds registers in their default states until the RST pin is set to a logic high state.
At the top of this Click board™, there is also a terminal labeled Rext used to connect an external resistor to set the LED current. The TLC59116 scales up the reference current set by the external resistor to sink the output current at each output port.
This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before use with MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used, as a reference, for further development.
Specifications
Type
LED Drivers
Applications
Can be used for RGBA color mixing and backlight application for amusement products, LED status signalization, home automation projects, industrial equipment, and many more.
On-board modules
TLC59116 – I2C bus controlled 16-channel LED driver optimized for red/green/blue/amber (RGBA) color mixing and backlight application from Texas Instruments
Key Features
16 LED programmable drivers, output current adjusted through an external resistor, supports hot insertion, programmable group dimming and blinking, and many more.
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on LED Driver 9 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
J1-J2 | HM2x5 | Populated | LED Driver Channels |
LED Driver 9 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Maximum Output Current | – | – | 120 | mA |
Maximum Output Voltage | – | – | 17 | V |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the LED Driver 9 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on mikroE github account.
Library Description
This library contains API for LED Driver 9 Click driver.
Key functions:
leddriver9_cfg_setup
– Config Object Initialization function.leddriver9_init
– Initialization function.leddriver9_default_cfg
– Click Default Configuration function.
Examples description
The application is composed of three sections :
void application_task ( void ) { float duty_cnt = min_duty; while ( duty_cnt <= max_duty ) { leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL0, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL1, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL2, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL3, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL4, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL5, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL6, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL7, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL8, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL9, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL10, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL11, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL12, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL13, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL14, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL15, duty_cnt ); duty_cnt += duty_gradient; Delay_ms( breathing_speed ); } while ( duty_cnt > min_duty ) { leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL0, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL1, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL2, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL3, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL4, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL5, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL6, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL7, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL8, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL9, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL10, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL11, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL12, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL13, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL14, duty_cnt ); leddriver9_set_pwm( &leddriver9, LEDDRIVER9_CHANNEL15, duty_cnt ); duty_cnt -= duty_gradient; Delay_ms( breathing_speed ); } }
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on mikroE github account.
Other mikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.LEDDriver9
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.