Beginner
10 min

Provide isolated digital input signals for various applications with ISO1228 and STM32L496AG

Eight-channel isolated digital input receiver with current limiting and LED indication

DIGI Isolator 2 Click with Discovery kit with STM32L496AG MCU

Published Jul 22, 2025

Click board™

DIGI Isolator 2 Click

Dev. board

Discovery kit with STM32L496AG MCU

Compiler

NECTO Studio

MCU

STM32L496AG

Safeguard and manage isolated digital input signals in various application areas, such as programmable logic controllers and digital input modules in industrial settings

A

A

Hardware Overview

How does it work?

DIGI Isolator 2 Click is based on the ISO1228, an eight-channel isolated digital input from Texas Instruments. The ISO1228 on this Click board™ is configured in sinking type of inputs. The current drawn from the digital inputs is diverted to LEDs once the digital input crosses the input voltage threshold. This feature allows field-side LED indication with no additional power consumption. The field supply voltage ranges from 8.5 up to 36V, and besides digital inputs, it can be connected over the screw terminals. The isolator also features wire-break detection, an integrated field supply voltage monitor, a built-in CRC check across the barrier, and more. There are several settings that you can make on DIGI Isolator 2 Click. The ISO1228 supports built-in digital low-pass filters, which the software can program. You can also program it over

two FILTER SEL jumpers, which support three input states (high, low, float), resulting in 9 values. Software settings will override those on FILTER SEL. The isolator will turn the FAULT LED on if a fault condition occurs. DIGI Isolator 2 Click can use a standard 4-wire SPI serial interface to communicate with the host MCU, supporting clock frequencies of up to 25MHz. While using the SPI interface, you can reset the device over the RST pin and control the enable function over the EN pin. Whenever the data on inputs of the isolator changes, the interrupt INT pin will go Low. Whenever the information for the synchronization with the host MCU is transmitted, the SYN pin will be asserted High. The SPI interface supports the Burst mode, which can be selected over the FUNC SEL B jumper. You can also use a parallel interface

where the four SPI pins, along with the RST, SYN, and INT, will act as standard general-purpose inputs (isolator outputs). The OUT7 of the ISO1228 is also used as a Burst mode jumper. In parallel mode, you should let the FUNC SEL B jumper float. Furthermore, you can’t use the input 6 of the DIGI Isolator 2 Click board™. The selection of communication can be made over the FUNC SEL C jumper. This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC 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.

DIGI Isolator 2 Click hardware overview image

Features overview

Development board

The 32L496GDISCOVERY Discovery kit serves as a comprehensive demonstration and development platform for the STM32L496AG microcontroller, featuring an Arm® Cortex®-M4 core. Designed for applications that demand a balance of high performance, advanced graphics, and ultra-low power consumption, this kit enables seamless prototyping for a wide range of embedded solutions. With its innovative energy-efficient

architecture, the STM32L496AG integrates extended RAM and the Chrom-ART Accelerator, enhancing graphics performance while maintaining low power consumption. This makes the kit particularly well-suited for applications involving audio processing, graphical user interfaces, and real-time data acquisition, where energy efficiency is a key requirement. For ease of development, the board includes an onboard ST-LINK/V2-1

debugger/programmer, providing a seamless out-of-the-box experience for loading, debugging, and testing applications without requiring additional hardware. The combination of low power features, enhanced memory capabilities, and built-in debugging tools makes the 32L496GDISCOVERY kit an ideal choice for prototyping advanced embedded systems with state-of-the-art energy efficiency.

Discovery kit with STM32L496AG MCU double side image

Microcontroller Overview

MCU Card / MCU

STM32L496AG Image

Architecture

ARM Cortex-M4

MCU Memory (KB)

1024

Silicon Vendor

STMicroelectronics

Pin count

169

RAM (Bytes)

327680

Used MCU Pins

mikroBUS™ mapper

Enable Input
PA4
AN
Reset / ID SEL
PB2
RST
SPI Select / ID COMM
PG11
CS
SPI Clock
PI1
SCK
SPI Data OUT
PD3
MISO
SPI Data IN
PI3
MOSI
Power Supply
3.3V
3.3V
Ground
GND
GND
External sync
PA0
PWM
Interrupt
PH2
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

DIGI Isolator 2 Click Schematic schematic

Step by step

Project assembly

Discovery kit with STM32H750XB MCU front image hardware assembly

Start by selecting your development board and Click board™. Begin with the Discovery kit with STM32L496AG MCU as your development board.

Discovery kit with STM32H750XB MCU front image hardware assembly
Thermo 21 Click front image hardware assembly
Prog-cut hardware assembly
Thermo 21 Click complete accessories setup image hardware assembly
Board mapper by product7 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
Discovery kit with STM32H750XB MCU NECTO MCU Selection Step hardware assembly
Necto No Display image step 8 hardware assembly
Necto image step 9 hardware assembly
Necto image step 10 hardware assembly
Necto image step 11 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 DIGI Isolator 2 Click driver.

Key functions:

  • digiisolator2_enable_output - This function enables output by setting the EN pin to high state.

  • digiisolator2_disable_output - This function disables output by setting the EN pin to low state.

  • digiisolator2_read_inputs - This function reads all inputs state via the selected driver interface.

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 DIGI Isolator 2 Click example
 *
 * # Description
 * This example demonstrates the use of DIGI Isolator 2 Click board by reading
 * and displaying the state of 8 digital input channels.
 *
 * The demo application is composed of two sections :
 *
 * ## Application Init
 * Initializes the driver and enables isolator outputs.
 *
 * ## Application Task
 * Reads the state of 8 digital input channels in hex format where MSB represents
 * IN8 and LSB the channel IN1. The results are displayed on the USB UART every 500ms.
 *
 * @author Stefan Filipovic
 *
 */

#include "board.h"
#include "log.h"
#include "digiisolator2.h"

static digiisolator2_t digiisolator2;
static log_t logger;

void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    digiisolator2_cfg_t digiisolator2_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.
    digiisolator2_cfg_setup( &digiisolator2_cfg );
    DIGIISOLATOR2_MAP_MIKROBUS( digiisolator2_cfg, MIKROBUS_1 );
    if ( DIGIISOLATOR2_OK != digiisolator2_init( &digiisolator2, &digiisolator2_cfg ) )
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

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

void application_task ( void )
{
    uint8_t input_data = 0;
    if ( DIGIISOLATOR2_OK == digiisolator2_read_inputs ( &digiisolator2, &input_data ) )
    {
        log_printf( &logger, " INPUT: 0x%.2X\r\n\n", ( uint16_t ) input_data );
        Delay_ms ( 500 );
    }
}

int main ( void ) 
{
    /* Do not remove this line or clock might not be set correctly. */
    #ifdef PREINIT_SUPPORTED
    preinit();
    #endif
    
    application_init( );
    
    for ( ; ; ) 
    {
        application_task( );
    }

    return 0;
}

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