TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (352 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 (136719 times)
  2. FAT32 Library (69925 times)
  3. Network Ethernet Library (55939 times)
  4. USB Device Library (46261 times)
  5. Network WiFi Library (41884 times)
  6. FT800 Library (41150 times)
  7. GSM click (28979 times)
  8. PID Library (26412 times)
  9. mikroSDK (26356 times)
  10. microSD click (25353 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

Buck n Boost click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.8

mikroSDK Library: 2.0.0.0

Category: Buck-Boost

Downloaded: 51 times

Not followed.

License: MIT license  

Buck & Boost Click is a compact add-on board that contains a configurable power management device. This board features the MIC7401, a highly-integrated power-management IC featuring five synchronous buck regulators, one boost regulator, and a high-speed I2C interface with an internal EEPROM memory from Microchip.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Buck n Boost click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Buck n Boost click" changes.

Do you want to report abuse regarding "Buck n Boost click".

  • mikroSDK Library 1.0.0.0
  • Comments (0)

mikroSDK Library Blog


Buck n Boost click

Buck & Boost Click is a compact add-on board that contains a configurable power management device. This board features the MIC7401, a highly-integrated power-management IC featuring five synchronous buck regulators, one boost regulator, and a high-speed I2C interface with an internal EEPROM memory from Microchip.

bucknboost_click.png

click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Jun 2021.
  • Type : I2C type

Software Support

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

Standard key functions :

  • bucknboost_cfg_setup Config Object Initialization function.

    void bucknboost_cfg_setup ( bucknboost_cfg_t *cfg );
  • bucknboost_init Initialization function.

    BUCKNBOOST_RETVAL bucknboost_init ( bucknboost_t *ctx, bucknboost_cfg_t *cfg );
  • bucknboost_default_cfg Click Default Configuration function.

    void bucknboost_default_cfg ( bucknboost_t *ctx );

Example key functions :

  • bucknboost_set_buck_out_voltage This function sets the output voltage of a desired buck channel.

    err_t bucknboost_set_buck_out_voltage ( bucknboost_t *ctx, uint8_t ch_num, uint8_t data_in );
  • bucknboost_set_boost_out_voltage This function sets the output voltage of the boost channel (CH6).

    err_t bucknboost_set_boost_out_voltage ( bucknboost_t *ctx, uint8_t data_in );
  • bucknboost_get_status This function reads Power Good, EEPROM, and Overcurrent status registers.

    err_t bucknboost_get_status ( bucknboost_t *ctx, bucknboost_status_t *st_data );

Example Description

This application demonstrates the use of Buck n Boost click board.

The demo application is composed of two sections :

Application Init

Initializes the driver and sets the click default configuration. The default config enables the click board and limits the current of all outputs to 1100mA. It also sets the default voltages of all channels which are the following: OUT1 - 1.8V, OUT2 - 1.1V, OUT3 - 1.8V, OUT4 - 1.05V, OUT5 - 1.25V, OUT6 - 12V


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    bucknboost_cfg_t bucknboost_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.

    bucknboost_cfg_setup( &bucknboost_cfg );
    BUCKNBOOST_MAP_MIKROBUS( bucknboost_cfg, MIKROBUS_1 );

    err_t init_flag = bucknboost_init( &bucknboost, &bucknboost_cfg );
    if ( init_flag == I2C_MASTER_ERROR ) 
    {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }

    init_flag = bucknboost_default_cfg ( &bucknboost );
    if ( init_flag == BUCKNBOOST_ERROR ) 
    {
        log_error( &logger, " Default Config Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }

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

Application Task

Iterates through the entire range of Buck voltages for Buck 1 output starting from the maximal output. It also checks the Power Good and Overcurrent status. All data is being displayed on the USB UART where you can track the program flow.


void application_task ( void )
{
    bucknboost_status_t status_data;

    for ( uint8_t cnt = BUCKNBOOST_BUCK_OUTPUT_VOLTAGE_3300mV; 
          cnt <= BUCKNBOOST_BUCK_OUTPUT_VOLTAGE_800mV; cnt++ )
    {
        err_t error_check = bucknboost_set_buck_out_voltage( &bucknboost, 
                                                             BUCKNBOOST_OUTPUT_CH_1, 
                                                             cnt );
        if ( error_check == BUCKNBOOST_ERROR )
        {
            log_error( &logger, " Setting Buck 1 Output Voltage." );
            Delay_ms ( 1000 );
            Delay_ms ( 1000 );
            Delay_ms ( 1000 );
        }
        else
        {
            log_printf( &logger, " Buck 1 Output Voltage set to %u mV.\r\n", 3300 - cnt * 50 );

            bucknboost_get_status( &bucknboost, &status_data );
            log_printf( &logger, " Power Good status -" );
            if ( status_data.power_good == BUCKNBOOST_PGOOD_ALL_MASK )
            {
                log_printf( &logger, " Valid!\r\n" );
            }
            else
            {
                log_printf( &logger, " Not Valid! - Mask: 0x%.2X\r\n", ( uint16_t ) status_data.power_good );
            }

            log_printf( &logger, " Overcurrent status -" );
            if ( status_data.power_good == BUCKNBOOST_PGOOD_ALL_MASK )
            {
                log_printf( &logger, " No Fault!\r\n" );
            }
            else
            {
                log_printf( &logger, " Fault! - Mask: 0x%.2X\r\n", ( uint16_t ) status_data.overcurrent_fault );
            }
            log_printf( &logger, "-----------------------------------\r\n" );
        }
        Delay_ms ( 1000 );
        Delay_ms ( 1000 );
    }
}

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

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

EEPROM 6 click

0

EEPROM 6 Click is a compact add-on board that contains a serial EEPROM memory that operates from the 1-Wire interface. This board features the DS28EC20, a 20480-bit EEPROM organized as 80 memory pages of 256 bits each from Analog Devices. As a specific feature, blocks of eight memory pages can be write-protected or put in “EPROM-Emulation” Mode, where bits can only be changed from a 1 to a 0 state. It communicates with MCU at 15.4kbps or 90kbps over the 1-Wire protocol and has a 64-bit registration number that ensures error-free device selection.

[Learn More]

Motion 3 click

0

Motion 3 Click is a Click board™ based on EKMC1606112, PIR motion sensor from Panasonic Corporation that's used as human motion detector. Also featured on Motion 3 Click bord is TLP241A photorelay from Toshiba that is used to provide a reinforced galvanic isolation for the external signals used to drive some external high power electronic equipment when motion is detected. It's allowing up to 40V between the SSR contacts in OFF state, and currents up to 2A while in ON state, thanks to a very low ON-state resistance. Motion 3 Click board™ is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.

[Learn More]

Pressure 3 click

0

Pressure 3 click is a mikroBUS add-on board that carries an Infineon DPS310 digital barometric pressure sensor. It has an operating range from 300 to 1200 hPa with a relative accuracy of 0.06 hPa and absolute accuracy of 1 hPa.

[Learn More]