TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137110 times)
  2. FAT32 Library (70237 times)
  3. Network Ethernet Library (56129 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42080 times)
  6. FT800 Library (41390 times)
  7. GSM click (29118 times)
  8. mikroSDK (26564 times)
  9. PID Library (26503 times)
  10. microSD click (25487 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

LED Driver 15 click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.6

mikroSDK Library: 2.0.0.0

Category: LED Drivers

Downloaded: 43 times

Not followed.

License: MIT license  

LED Driver 15 Click is a compact add-on board that simplifies the control of multiple LEDs. This board features the MP3309C, a fully integrated synchronous boost white LED driver with an I2C interface from Monolithic Power Systems. The MP3309C offers high efficiency, delivers up to 40mA of LED current, and operates from a voltage of mikroBUS™ power rails, supporting up to 8 white LEDs in series. It also features a programmable switching frequency to optimize efficiency, supports analog and PWM dimming, and has multiple built-in protection functions that protect the circuit during abnormalities.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "LED Driver 15 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "LED Driver 15 click" changes.

Do you want to report abuse regarding "LED Driver 15 click".

  • Information
  • Comments (0)

mikroSDK Library Blog


LED Driver 15 click

LED Driver 15 Click is a compact add-on board that simplifies the control of multiple LEDs. This board features the MP3309C, a fully integrated synchronous boost white LED driver with an I2C interface from Monolithic Power Systems. The MP3309C offers high efficiency, delivers up to 40mA of LED current, and operates from a voltage of mikroBUS™ power rails, supporting up to 8 white LEDs in series. It also features a programmable switching frequency to optimize efficiency, supports analog and PWM dimming, and has multiple built-in protection functions that protect the circuit during abnormalities.

leddriver15_click.png

click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Jan 2023.
  • Type : I2C type

Software Support

We provide a library for the LED Driver 15 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 15 Click driver.

Standard key functions :

  • leddriver15_cfg_setup Config Object Initialization function.

    void leddriver15_cfg_setup ( leddriver15_cfg_t *cfg );
  • leddriver15_init Initialization function.

    err_t leddriver15_init ( leddriver15_t *ctx, leddriver15_cfg_t *cfg );
  • leddriver15_default_cfg Click Default Configuration function.

    err_t leddriver15_default_cfg ( leddriver15_t *ctx );

Example key functions :

  • leddriver15_set_i2c_dimming This function sets the LEDs dimming level in I2C mode.

    err_t leddriver15_set_i2c_dimming ( leddriver15_t *ctx, uint8_t dimming );
  • leddriver15_enable_device This function enables the device by setting the EN pin to high logic state.

    void leddriver15_enable_device ( leddriver15_t *ctx );
  • leddriver15_disable_device This function disables the device by setting the EN pin to low logic state.

    void leddriver15_disable_device ( leddriver15_t *ctx );

Example Description

This example demonstrates the use of LED Driver 15 click board by changing the LEDs dimming level.

The demo application is composed of two sections :

Application Init

Initializes the driver and performs the click default configuration.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    leddriver15_cfg_t leddriver15_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    leddriver15_cfg_setup( &leddriver15_cfg );
    LEDDRIVER15_MAP_MIKROBUS( leddriver15_cfg, MIKROBUS_1 );
    if ( LEDDRIVER15_OK != leddriver15_init( &leddriver15, &leddriver15_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( LEDDRIVER15_OK != leddriver15_default_cfg ( &leddriver15 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

    log_info( &logger, " Application Task " );
}

Application Task

Changes the LEDs dimming level in I2C mode every 500ms. The dimming level will be displayed on the USB UART.

void application_task ( void )
{
    static uint8_t dimming = LEDDRIVER15_I2C_DIMMING_MIN;
    if ( LEDDRIVER15_OK == leddriver15_set_i2c_dimming ( &leddriver15, dimming ) )
    {
        log_printf( &logger, " Dimming level: %u\r\n\n", ( uint16_t ) dimming );
    }
    if ( ++dimming > LEDDRIVER15_I2C_DIMMING_MAX )
    {
        dimming = LEDDRIVER15_I2C_DIMMING_MIN;
    }
    Delay_ms ( 500 );
}

Note

It is recommended to connect 8 LEDs in series (40mA) to the output connector.

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.LEDDriver15

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 MikroElektronika compilers.


ALSO FROM THIS AUTHOR

3D Hall 8 click

0

3D Hall 8 Click is a compact add-on board containing an ultra-small 3D-magnetic sensor for industrial and consumer applications.

[Learn More]

LDC 1000 click

0

LDC1000 click carries the world's first inductance-to-digital converter IC, along with a detachable sensor (an LC tank comprising a 36-turn PCB coil and a 100pF 1% NPO capacitor). The LDC1000 IC has a sub-micron resolution in short range applications; the board is ideal for highly precise short range measurements of the position, motion or composition of conductive targets.

[Learn More]

I2C to SPI click

0

I2C to SPi Click is an all-in-one solution which allows serving as an interface between a standard I2C-bus of a microcontroller and an SPi bus, which allows the microcontroller to communicate directly with SPi devices through its I2C-bus. It is equipped with the stacking headers, so it can be easily connected.

[Learn More]