bucknboost 2.0.0.0
Main Page

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.

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 :

Example key functions :

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;
bucknboost_cfg_t bucknboost_cfg;
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 " );
}
@ BUCKNBOOST_ERROR
Definition bucknboost.h:408
#define BUCKNBOOST_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition bucknboost.h:345
void application_init(void)
Definition main.c:33

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;
{
err_t error_check = bucknboost_set_buck_out_voltage( &bucknboost,
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 );
}
}
#define BUCKNBOOST_BUCK_OUTPUT_VOLTAGE_800mV
Buck n Boost Buck Output Voltage setting.
Definition bucknboost.h:193
#define BUCKNBOOST_OUTPUT_CH_1
Buck n Boost Output Channel setting.
Definition bucknboost.h:182
#define BUCKNBOOST_PGOOD_ALL_MASK
Definition bucknboost.h:296
#define BUCKNBOOST_BUCK_OUTPUT_VOLTAGE_3300mV
Definition bucknboost.h:243
void application_task(void)
Definition main.c:77
uint8_t overcurrent_fault
Definition bucknboost.h:420
uint8_t power_good
Definition bucknboost.h:418

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.