How does it work?
LED Ring 2 Click is based on the LP5862, a high-performance LED matrix driver from Texas Instruments. The LP5862 integrates 18 constant current sinks for driving 18 LEDs. A standard yellow LED is used as a light source, the SML-LX0402SYC-TR, with a peak wavelength of 590nm. With the help of two additional LP5862 drivers, it is realized, as shown on this board, a LED ring of 54 yellow LEDs arranged in a circular pattern. This Click board™ can significantly improve user experience in various animation and indication application areas like smart home, gaming equipment, and other human-machine interaction applications.
This Click board™ communicates with an MCU using the standard I2C 2-Wire interface to read data and configure settings, supporting Fast-Plus mode with a frequency of up to 1MHz. The LP5862 also supports the register-configurable PWM dimming method for efficiently adjusting LED light brightness. For PWM dimming, the integrated 8-bit or 16-bit configurable, >20kHz PWM generators for each LED enable smooth, vivid animation effects without audible noise. Each LED can also be mapped into an 8-bit group PWM to achieve group control with minimum data traffic. The VSY pin of the mikroBUS™ socket serves as a synchronization signal.
The LP5862 also implements full addressable SRAM, supporting entire SRAM data refresh and partial SRAM data update on demand to minimize the data traffic. Besides, the LP5862 implements the ghost cancellation circuit to eliminate upside and downside ghosting.
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. In addition, it is possible to select the LED supply voltage between either 3.3V or 5V voltage level set via the VLED SEL jumper. However, the 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.
Specifications
Type
I2C,LED Matrix
Applications
Can be used for animation and indication purposes for amusement products, LED status signalization, home automation projects, and more
On-board modules
LP5862 – LED matrix driver from Texas Instruments
Key Features
18 constant current sinks, 54 LEDs arranged in a circular pattern for animation and indication purposes, wide operating voltage, high performance, high efficiency PWM dimming, low power consumption, fully addressable SRAM to minimize data traffic, I2C interface, and more
Interface
I2C
Feature
ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on LED Ring 2 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 |
– | – | – | Yellow Ring LED Indicators |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2 | VLED SEL | Left | LED Supply Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
LED Ring 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Software Support
We provide a library for the LED Ring 2 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 LED Ring 2 Click driver.
Key functions
-
ledring2_set_led_brightness
LED Ring 2 set LED brightness function. -
ledring2_set_led_pos_state
LED Ring 2 set LED state function. -
ledring2_enable
LED Ring 2 enable function.
Example Description
This library contains API for LED Ring 2 Click driver. The library initializes and defines the I2C bus drivers to write and read data from registers. The library also includes a function for controlling LEDs.
void application_task ( void )
{
for ( uint8_t led_pos = 1; led_pos < 55; led_pos++ )
{
if ( LEDRING2_OK == ledring2_set_led_brightness( &ledring2, led_pos, ( led_pos * 100 ) + 255 ) )
{
ledring2_set_vsync( &ledring2 );
Delay_ms( 10 );
}
}
Delay_ms( 1000 );
for ( uint8_t led_pos = 54; led_pos > 0; led_pos-- )
{
if ( LEDRING2_OK == ledring2_set_led_brightness( &ledring2, led_pos, 0 ) )
{
ledring2_set_vsync( &ledring2 );
Delay_ms( 10 );
}
}
Delay_ms( 1000 );
}
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.LEDRing2
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, that needs to be downloaded from the LibStock and installed for the compiler you are using to ensure proper operation of mikroSDK compliant Click board™ demo applications.
For more information about mikroSDK, visit the official page.