currentlimit9  2.1.0.0
Main Page

Current Limit 9 click

Current Limit 9 Click is a compact add-on board representing a current-limiting solution for your application. This board features the NPS4053, a load switch with a precision adjustable current limit from Nexperia. It is a 5.5V, 55mΩ load switch that allows precise adjustment of the current limit in a range of 110mA up to 2.5A while preserving the constant current during the current limiting.

click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Oct 2023.
  • Type : I2C type

Software Support

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

Standard key functions :

Example key functions :

Example Description

This library contains API for the Current Limit 9 Click driver. This driver provides the functions to set the current limiting conditions in order to provide the threshold of the fault conditions.

The demo application is composed of two sections :

Application Init

Initialization of I2C module and log UART. After driver initialization, the app executes a default configuration and sets the current limit threshold of 460 mA.

void application_init ( void )
{
log_cfg_t log_cfg;
currentlimit9_cfg_t currentlimit9_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
currentlimit9_cfg_setup( &currentlimit9_cfg );
CURRENTLIMIT9_MAP_MIKROBUS( currentlimit9_cfg, MIKROBUS_1 );
if ( I2C_MASTER_ERROR == currentlimit9_init( &currentlimit9, &currentlimit9_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
if ( CURRENTLIMIT9_ERROR == currentlimit9_default_cfg ( &currentlimit9 ) )
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
{
log_error( &logger, " Current limit threshold." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
Delay_ms ( 100 );
}

Application Task

This example demonstrates the use of the Current Limit 9 Click board. The demo application checks the fault flag for overcurrent conditions. Results are being sent to the UART Terminal, where you can track their changes.

void application_task ( void )
{
{
log_printf( &logger, "Fault flag: Overcurrent\r\n" );
}
else
{
log_printf( &logger, " Current limit is 460 mA\r\n" );
}
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.CurrentLimit9

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.


currentlimit9_cfg_setup
void currentlimit9_cfg_setup(currentlimit9_cfg_t *cfg)
Current Limit 9 configuration object setup function.
currentlimit9_limit_t
currentlimit9_limit_t
Current Limit 9 current limit values.
Definition: currentlimit9.h:197
application_task
void application_task(void)
Definition: main.c:76
CURRENTLIMIT9_LIMIT_0_46_A
@ CURRENTLIMIT9_LIMIT_0_46_A
Definition: currentlimit9.h:199
currentlimit9_init
err_t currentlimit9_init(currentlimit9_t *ctx, currentlimit9_cfg_t *cfg)
Current Limit 9 initialization function.
currentlimit9_enable
void currentlimit9_enable(currentlimit9_t *ctx)
Current Limit 9 enable the device function.
currentlimit9_default_cfg
err_t currentlimit9_default_cfg(currentlimit9_t *ctx)
Current Limit 9 default configuration function.
currentlimit9_set_limit
err_t currentlimit9_set_limit(currentlimit9_t *ctx, currentlimit9_limit_t current_limit)
Current Limit 9 sets the current limit function.
currentlimit9_get_fault
uint8_t currentlimit9_get_fault(currentlimit9_t *ctx)
Current Limit 9 get the fault flag function.
application_init
void application_init(void)
Definition: main.c:33
currentlimit9_cfg_t
Current Limit 9 Click configuration object.
Definition: currentlimit9.h:168
CURRENTLIMIT9_ERROR
@ CURRENTLIMIT9_ERROR
Definition: currentlimit9.h:188
CURRENTLIMIT9_FAULT_FLAG
#define CURRENTLIMIT9_FAULT_FLAG
Current Limit 9 wiper and resistance data values.
Definition: currentlimit9.h:103
currentlimit9_t
Current Limit 9 Click context object.
Definition: currentlimit9.h:148
CURRENTLIMIT9_MAP_MIKROBUS
#define CURRENTLIMIT9_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition: currentlimit9.h:134