TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139251 times)
  2. FAT32 Library (71749 times)
  3. Network Ethernet Library (57121 times)
  4. USB Device Library (47430 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28077 times)
  9. PID Library (26885 times)
  10. microSD click (26198 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

Serializer Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.8

mikroSDK Library: 2.0.0.0

Category: Measurements

Downloaded: 131 times

Not followed.

License: MIT license  

Serializer Click is a compact add-on board that contains a digital input translator/serializer. This board features the MAX31910, an eight-channel digital input serializer for high-channel density digital input modules in industrial and process automation from Analog Devices. The MAX31910 translates, conditions, and serializes the 24V digital output of sensors and switches to 5V CMOS-compatible signals required by the MCU. It provides the front-end interface circuit of a programmable logic controller (PLC) digital input module. It communicates with MCU via the SPI interface and comes in configuration with an installed digital isolator. This Click board™ is suited for various applications such as industrial, process, and building automation, digital input modules for PLCs, and more.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Serializer Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Serializer Click" changes.

Do you want to report abuse regarding "Serializer Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Serializer Click

Serializer Click is a compact add-on board that contains a digital input translator/serializer. This board features the MAX31910, an eight-channel digital input serializer for high-channel density digital input modules in industrial and process automation from Analog Devices. The MAX31910 translates, conditions, and serializes the 24V digital output of sensors and switches to 5V CMOS-compatible signals required by the MCU. It provides the front-end interface circuit of a programmable logic controller (PLC) digital input module. It communicates with MCU via the SPI interface and comes in configuration with an installed digital isolator. This Click board™ is suited for various applications such as industrial, process, and building automation, digital input modules for PLCs, and more.

serializer_click.png

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Oct 2021.
  • Type : SPI type

Software Support

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

Standard key functions :

  • serializer_cfg_setup Config Object Initialization function.

    void serializer_cfg_setup ( serializer_cfg_t *cfg );
  • serializer_init Initialization function.

    err_t serializer_init ( serializer_t *ctx, serializer_cfg_t *cfg );

Example key functions :

  • serializer_get_flt_pin This function returns the fault pin logic state.

    uint8_t serializer_get_flt_pin ( serializer_t *ctx );
  • serializer_read_input This function reads the input data by using SPI serial interface, and then checks the data integrity by verifying the CRC byte.

    err_t serializer_read_input ( serializer_t *ctx, uint8_t *data_out );

Example Description

This example demonstrates the use of a Serializer Click board by reading the state of all inputs and displaying the results on the USB UART.

The demo application is composed of two sections :

Application Init

Initializes the driver and logger.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    serializer_cfg_t serializer_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.
    serializer_cfg_setup( &serializer_cfg );
    SERIALIZER_MAP_MIKROBUS( serializer_cfg, MIKROBUS_1 );
    if ( SPI_MASTER_ERROR == serializer_init( &serializer, &serializer_cfg ) )
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

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

Application Task

Reads the state of all inputs and displays the results on the USB UART approximately once per second. Also, if there's any fault indication detected, it will be displayed accordingly.


void application_task ( void )
{
    uint8_t input_data = 0;
    err_t status = serializer_read_input ( &serializer, &input_data );

    if ( SERIALIZER_ERROR != status )
    {
        for ( uint8_t cnt = 0; cnt < 8; cnt++ )
        {
            log_printf( &logger, " IN%u: %s\r\n", ( uint16_t ) cnt + 1, 
                                                  ( char * ) ( ( input_data & ( 1 << cnt ) ) ? "High" : "Low" ) );
        }
        if ( status & SERIALIZER_STATUS_UNDERVOLTAGE )
        {
            log_info( &logger, "Undervoltage fault" );
        }
        if ( status & SERIALIZER_STATUS_OVERTEMPERATURE )
        {
            log_info( &logger, "Overtemperature fault" );
        }
        log_printf( &logger, "\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.Serializer

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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.


ALSO FROM THIS AUTHOR

Water Detect 3 Click

0

Water Detect 3 Click is a compact add-on board that detects water and other electroconductive liquids. This board features the MCP606, a micropower CMOS operational amplifier from Microchip. In the same package, the Water Detect 3 Click comes with a separate PCB with an electroconductive water detection area connected to a Click board™ with wires.

[Learn More]

EZO Carrier DO Click

0

EZO Carrier Click - Oxygen is a compact add-on board suitable for determining the dissolved oxygen of a liquid in your application. This board features the EZO-DO™, an ISO 5814 compliant embedded dissolved oxygen circuit board from Atlas Scientific.

[Learn More]

ProxFusion click

5

ProxFusion click is a multifunctional capacitive and Hall-effect sensor device. This click can detect touch by using two onboard sensor pads, and it can sense a rotation angle of a magnetic field, parallel with the surface of the click board.

[Learn More]