How does it work?
1×4 RGB Click is based on the LP5812, an advanced RGB LED driver from Texas Instruments. This component manages four onboard RGB LEDs (CLV1A-FKB-CJ1M1F1BB7R4S3) with an autonomous animation engine. The LP5812 features an ultra-low operation current of about 0.4mA in Active mode at a maximum LED current setting of 25.5mA. When all LEDs are off, the device enters Standby mode to minimize power consumption while retaining data. Its autonomous animation engine allows for vivid and dynamic lighting effects without needing brightness control commands from the controller, making it ideal for applications in portable and wearable electronics, gaming, home entertainment, IoT, networking, and industrial HMI.
1×4 RGB Click is designed in a unique format supporting the newly introduced MIKROE feature called “Click Snap.” Unlike the standardized version of Click boards, this feature allows the main IC area to become movable by breaking the PCB, opening up many new possibilities for implementation. Thanks to the Snap feature, the LP5812 can operate autonomously by accessing its signals directly on the pins marked 1-8. Additionally, the Snap part includes a specified and fixed screw hole position, enabling users to secure the Snap board in their desired location.
This Click board™ uses a standard 2-wire I2C interface to communicate with the host MCU, supporting Fast mode Plus with up to 1MHz of frequency clock. It also supports both analog and PWM dimming. Analog dimming offers 256 steps for adjusting the output current of each LED, while PWM dimming, enabled by an 8-bit configurable PWM generator, ensures smooth brightness control. The SYC pin can serve as a PWM clock input or output, allowing multiple 1×4 RGB Click boards to synchronize their animations using a single clock signal from one of the LP5812 devices or an external controller. For enhanced visual performance, optional exponential PWM dimming can be activated for individual LEDs, providing a more human-eye-friendly experience.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used as a reference for further development.
Click Snap
Click Snap is an innovative feature of our standardized Click add-on boards, introducing a new level of flexibility and ease of use. This feature allows for easy detachment of the main sensor area by simply snapping the PCB along designated lines, enabling various implementation possibilities. For detailed information about Click Snap, please visit the official page dedicated to this feature.
Specifications
Type
LED Matrix
Applications
Ideal for portable and wearable electronics, gaming, home entertainment, IoT, networking, industrial HMI, and more
On-board modules
LP5812 – RGB LED driver with autonomous control from Texas Instruments
Key Features
Low power consumption, autonomous animation engine for dynamic lighting effects, support for both analog and PWM dimming, 256 steps for analog dimming, 8-bit configurable PWM generator for smooth brightness control, SYC pin for PWM clock synchronization, operation with 3.3V or 5V logic voltage levels, I2C interface, Click Snap feature for flexible implementation, and more
Interface
I2C,PWM
Feature
Click Snap,ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on 1×4 RGB 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 |
JP1 | VCC SEL | Left | Power Voltage Level Selection 3V3/5V: Left position 3V3, Right position 5V |
1×4 RGB Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Software Support
We provide a library for the 1×4 RGB Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on MIKROE github account.
Library Description
This library contains API for 1×4 RGB Click driver.
Key functions
-
c1x4rgb_set_rgb_color
This function sets the desired values of RGB colors for the selected LED by using the I2C serial interface. -
c1x4rgb_enable_leds
This function turns on the desired LEDs by using the I2C serial interface. -
c1x4rgb_set_tmc_mode
This function configures the desired LED drive mode as TCM 1/2/3/4 scans using the I2C serial interface.
Example Description
This example demonstrates the use of the 1×4 RGB Click board™ by controlling the color of the LEDs [LD1-LD4].
void application_task ( void )
{
log_printf( &logger, "rnn RED: " );
for ( uint8_t led_pos = C1X4RGB_LED_POS_LD1; led_pos <= C1X4RGB_LED_POS_LD4; led_pos++ )
{
if ( C1X4RGB_OK == c1x4rgb_set_rgb_color( &c1x4rgb, led_pos, DEMO_COLOR_INT_100,
DEMO_COLOR_INT_0,
DEMO_COLOR_INT_0 ) )
{
log_printf( &logger, " LD%d ", ( uint16_t ) led_pos );
Delay_ms( 100 );
}
}
log_printf( &logger, "rn GREEN: " );
for ( uint8_t led_pos = C1X4RGB_LED_POS_LD1; led_pos <= C1X4RGB_LED_POS_LD4; led_pos++ )
{
if ( C1X4RGB_OK == c1x4rgb_set_rgb_color( &c1x4rgb, led_pos, DEMO_COLOR_INT_0,
DEMO_COLOR_INT_100,
DEMO_COLOR_INT_0 ) )
{
log_printf( &logger, " LD%d ", ( uint16_t ) led_pos );
Delay_ms( 100 );
}
}
log_printf( &logger, "rn BLUE: " );
for ( uint8_t led_pos = C1X4RGB_LED_POS_LD1; led_pos <= C1X4RGB_LED_POS_LD4; led_pos++ )
{
if ( C1X4RGB_OK == c1x4rgb_set_rgb_color( &c1x4rgb, led_pos, DEMO_COLOR_INT_0,
DEMO_COLOR_INT_0,
DEMO_COLOR_INT_100 ) )
{
log_printf( &logger, " LD%d ", ( uint16_t ) led_pos );
Delay_ms( 100 );
}
}
log_printf( &logger, "rn WHITE:" );
for ( uint8_t led_pos = C1X4RGB_LED_POS_LD1; led_pos <= C1X4RGB_LED_POS_LD4; led_pos++ )
{
if ( C1X4RGB_OK == c1x4rgb_set_rgb_color( &c1x4rgb, led_pos, DEMO_COLOR_INT_100,
DEMO_COLOR_INT_100,
DEMO_COLOR_INT_100 ) )
{
log_printf( &logger, " LD%d ", ( uint16_t ) led_pos );
Delay_ms( 100 );
}
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on MIKROE github account.
Other MIKROE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.1x4RGB
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. UART terminal is available in all MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE 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.