Beginner
10 min

Keep your electronics running smoothly with the help of LS12052BD33 and PIC32MZ1024EFH064

Current storm? eFuse to the rescue!

eFuse 7 Click with PIC32MZ clicker

Published Nov 11, 2023

Click board™

eFuse 7 Click

Dev. board

PIC32MZ clicker

Compiler

NECTO Studio

MCU

PIC32MZ1024EFH064

Safeguard your electronic circuits from overcurrent events and ensure uninterrupted operation and longevity for your devices.

A

A

Hardware Overview

How does it work?

eFuse 7 Click is based on the LS12052BD33, an eFuse with over-voltage protection and blocking FET control from Littelfuse. It is a current limit load switch with an integrated power load switch designed to manage current/voltage/start-up voltage ramp to the connected load. The internal MOSFET of the device will start conducting and allowing current to flow from IN to OUT as VIN rises by enabling the eFuse with an accurate ON/OFF threshold of 1.29V and 1.19V, respectively. After a Start-Up sequence, the eFuse will actively monitor its load current and input voltage. The eFuse will ensure that any harmful spikes are

safely clamped to a  pre-determined level at the output. The eFuse will shut down its internal MOSFET if the overload of the current limit is exceeded or the device’s temperature exceeds its threshold. The eFuse uses the TP86R203NL, an N-channel MOS from Toshiba, as a gate to the output screw terminal. The current limit on this eFuse 7 Click can be programmed. For this purpose, there is the AD5227, a 64-position up/down control digital potentiometer from Analog Devices. This 10K end-to-end potentiometer, in variable resistor configuration, is used to feed the current limit program pin of the eFuse. eFuse 7 Click uses a

simple 3-Wire serial interface of the digital potentiometer to allow the host MCU to set the current limit to this Click board™. Over the RST pin, you can enable the eFuse with the logic HIGH. This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VIO SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this 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.

eFuse 7 Click hardware overview image

Features overview

Development board

PIC32MZ Clicker is a compact starter development board that brings the flexibility of add-on Click boards™ to your favorite microcontroller, making it a perfect starter kit for implementing your ideas. It comes with an onboard 32-bit PIC32MZ microcontroller with FPU from Microchip, a USB connector, LED indicators, buttons, a mikroProg connector, and a header for interfacing with external electronics. Thanks to its compact design with clear and easy-recognizable silkscreen markings, it provides a fluid and immersive working experience, allowing access anywhere and under

any circumstances. Each part of the PIC32MZ Clicker development kit contains the components necessary for the most efficient operation of the same board. In addition to the possibility of choosing the PIC32MZ Clicker programming method, using USB HID mikroBootloader, or through an external mikroProg connector for PIC, dsPIC, or PIC32 programmer, the Clicker board also includes a clean and regulated power supply module for the development kit. The USB Micro-B connection can provide up to 500mA of current, which is more than enough to operate all onboard

and additional modules. All communication methods that mikroBUS™ itself supports are on this board, including the well-established mikroBUS™ socket, reset button, and several buttons and LED indicators. PIC32MZ Clicker is an integral part of the Mikroe ecosystem, allowing you to create a new application in minutes. Natively supported by Mikroe software tools, it covers many aspects of prototyping thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.

PIC32MZ clicker double side image

Microcontroller Overview

MCU Card / MCU

default

Architecture

PIC32

MCU Memory (KB)

1024

Silicon Vendor

Microchip

Pin count

64

RAM (Bytes)

524288

Used MCU Pins

mikroBUS™ mapper

NC
NC
AN
Reset
RE5
RST
SPI Chip Select
RG9
CS
SPI Clock
RG6
SCK
NC
NC
MISO
SPI Data IN
RG8
MOSI
Power Supply
3.3V
3.3V
Ground
GND
GND
NC
NC
PWM
NC
NC
INT
NC
NC
TX
NC
NC
RX
NC
NC
SCL
NC
NC
SDA
Power Supply
5V
5V
Ground
GND
GND
1

Take a closer look

Click board™ Schematic

eFuse 7 Click Schematic schematic

Step by step

Project assembly

PIC32MZ clicker front image hardware assembly

Start by selecting your development board and Click board™. Begin with the PIC32MZ clicker as your development board.

PIC32MZ clicker front image hardware assembly
GNSS2 Click front image hardware assembly
Prog-cut hardware assembly
GNSS2 Click complete accessories setup image hardware assembly
Micro B Connector Clicker Access - upright/background hardware assembly
Necto image step 2 hardware assembly
Necto image step 3 hardware assembly
Necto image step 4 hardware assembly
Necto image step 5 hardware assembly
Necto image step 6 hardware assembly
Flip&Click PIC32MZ MCU step hardware assembly
Necto No Display image step 8 hardware assembly
Necto image step 9 hardware assembly
Necto image step 10 hardware assembly
Debug Image Necto Step hardware assembly

Track your results in real time

Application Output

1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support

Library Description

This library contains API for eFuse 7 Click driver.

Key functions:

  • efuse7_enable_output - eFuse 7 output enable function.

  • efuse7_wiper_inc - eFuse 7 wiper position increase function.

  • efuse7_set_limit - eFuse 7 set current limit function.

Open Source

Code example

The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.

/*!
 * @file main.c
 * @brief eFuse 7 Click Example.
 *
 * # Description
 * This library contains API for the eFuse 7 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 click module and UART log, then performing default 
 * configuration and setting a current limit to 1 A.
 *
 * ## Application Task
 * This example demonstrates the use of the eFuse 7 Click board.
 * Reading user's input from UART Terminal and using it as an index 
 * for an array of pre-calculated values that define the current limit level.
 * Results are being sent to the UART Terminal, where you can track their changes.
 *
 * @author Stefan Ilic
 *
 */

#include "board.h"
#include "log.h"
#include "efuse7.h"

static efuse7_t efuse7;   /**< eFuse 7 Click driver object. */
static log_t logger;      /**< Logger object. */

const uint8_t limit_value_op[ 8 ] = 
{ 
    EFUSE7_CURRENT_LIMIT_1A, 
    EFUSE7_CURRENT_LIMIT_2A,
    EFUSE7_CURRENT_LIMIT_2A5,
    EFUSE7_CURRENT_LIMIT_3A, 
    EFUSE7_CURRENT_LIMIT_3A5,
    EFUSE7_CURRENT_LIMIT_4A,
    EFUSE7_CURRENT_LIMIT_4A5,
    EFUSE7_CURRENT_LIMIT_5A,
};

static void display_selection ( void ) 
{
    log_printf( &logger, "  To select current limit  \r\n" );
    log_printf( &logger, "  Send one of the numbers: \r\n" );
    log_printf( &logger, "- - - - - - - - - - - - - -\r\n" );
    log_printf( &logger, " '0' - Limited to 1   A  \r\n" );
    log_printf( &logger, " '1' - Limited to 2   A  \r\n" );
    log_printf( &logger, " '2' - Limited to 2.5 A  \r\n" );
    log_printf( &logger, " '3' - Limited to 3   A  \r\n" );
    log_printf( &logger, " '4' - Limited to 3.5 A  \r\n" );
    log_printf( &logger, " '5' - Limited to 4   A  \r\n" );
    log_printf( &logger, " '6' - Limited to 4.5 A  \r\n" );  
    log_printf( &logger, " '7' - Limited to 5   A  \r\n" );  
    log_printf( &logger, "---------------------------\r\n" );
}

void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    efuse7_cfg_t efuse7_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.
    efuse7_cfg_setup( &efuse7_cfg );
    EFUSE7_MAP_MIKROBUS( efuse7_cfg, MIKROBUS_1 );
    if ( DIGITAL_OUT_UNSUPPORTED_PIN == efuse7_init( &efuse7, &efuse7_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }
    
    if ( EFUSE7_ERROR == efuse7_default_cfg ( &efuse7 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }
    
    log_info( &logger, " Application Task " );
    display_selection( );
    Delay_ms( 100 );
}

void application_task ( void ) 
{
    static char index;
    
    if ( 1 == log_read( &logger, &index, 1 ) ) 
    {
        if ( ( index >= '0' ) && ( index <= '7' ) ) 
        {
            efuse7_set_limit ( &efuse7, limit_value_op[ index - 48 ] );
            log_printf( &logger, "  >>> Selected mode %c     \r\n", index );
            log_printf( &logger, "---------------------------\r\n" );
            Delay_ms( 100 );
        }
        else 
        { 
            log_printf( &logger, "    Data not in range!    \r\n" );
            log_printf( &logger, "---------------------------\r\n" );
            display_selection( );
            Delay_ms( 100 );
        }
    }
}

void main ( void ) 
{
    application_init( );

    for ( ; ; ) 
    {
        application_task( );
    }
}

// ------------------------------------------------------------------------ END

Additional Support

Resources

Love this project?

'Buy This Kit' button takes you directly to the shopping cart where you can easily add or remove products.