TOP Contributors

  1. MIKROE (2750 codes)
  2. Alcides Ramos (372 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 (139022 times)
  2. FAT32 Library (71563 times)
  3. Network Ethernet Library (56975 times)
  4. USB Device Library (47295 times)
  5. Network WiFi Library (43003 times)
  6. FT800 Library (42291 times)
  7. GSM click (29727 times)
  8. mikroSDK (27853 times)
  9. PID Library (26846 times)
  10. microSD click (26093 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

ISM RX 3 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.10

mikroSDK Library: 2.0.0.0

Category: Sub-1 GHz Transceivers

Downloaded: 169 times

Not followed.

License: MIT license  

ISM RX 3 Click is a compact add-on board that contains a Sub-GHz RF receiver. This board features the MAX41470, a high-performance, low-power receiver ideal for amplitude shift-keyed (ASK) and frequency shift-keyed (FSK) data from Maxim Integrated, now part of Analog Devices.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "ISM RX 3 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "ISM RX 3 Click" changes.

Do you want to report abuse regarding "ISM RX 3 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


ISM RX 3 Click

ISM RX 3 Click is a compact add-on board that contains a Sub-GHz RF receiver. This board features the MAX41470, a high-performance, low-power receiver ideal for amplitude shift-keyed (ASK) and frequency shift-keyed (FSK) data from Maxim Integrated, now part of Analog Devices.

ismrx3_click.png

Click Product page


Click library

  • Author : Luka FIlipovic
  • Date : Feb 2021.
  • Type : SPI type

Software Support

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

Standard key functions :

  • ismrx3_cfg_setup Config Object Initialization function.

    void ismrx3_cfg_setup ( ismrx3_cfg_t *cfg );
  • ismrx3_init Initialization function.

    err_t ismrx3_init ( ismrx3_t *ctx, ismrx3_cfg_t *cfg );
  • ismrx3_default_cfg Click Default Configuration function.

    err_t ismrx3_default_cfg ( ismrx3_t *ctx );

Example key functions :

  • ismrx3_reset Reset function.

    void ismrx3_reset( ismrx3_t *ctx );
  • ismrx3_get_data Read data output.

    uint8_t ismrx3_get_data( ismrx3_t *ctx );
  • ismrx3_get_clk Read clock output.

    uint8_t ismrx3_get_clk( ismrx3_t *ctx );

Example Description

This example showcases ability of Click board to configure and read incoming rf signal and parses data using data and clock line.

The demo application is composed of two sections :

Application Init

Initialization of communication modules (SPI, UART), and additional communication pins. Resets device, reads device ID, and sets default configuration that sets ASK modulation and 433.92MHz with 5bps data rate.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    ismrx3_cfg_t ismrx3_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.
    ismrx3_cfg_setup( &ismrx3_cfg );
    ISMRX3_MAP_MIKROBUS( ismrx3_cfg, MIKROBUS_1 );
    err_t init_flag  = ismrx3_init( &ismrx3, &ismrx3_cfg );
    if ( init_flag == SPI_MASTER_ERROR )
    {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }

    ismrx3_reset( &ismrx3 );

    uint8_t read_data;
    ismrx3_generic_read( &ismrx3, 0x1E, &read_data );
    log_info( &logger, " > ID: 0x%.2X", ( uint16_t )read_data );
    Delay_ms ( 500 );

    ismrx3.modulation = ISMRX3_MODULATION_ASK;
    ismrx3.reference_freq = ISMRX3_FREQUENCY_MHZ_433p92;
    ismrx3.data_rate = ISMRX3_DATA_RATE_KBPS_5;
    ismrx3.freq_deviation = ISMRX3_DEVIATION_KHZ_40;

    if ( ISMRX3_ERROR == ismrx3_default_cfg ( &ismrx3 ) )
    {
        log_error( &logger, " Configuration Error. " );
        log_info( &logger, " Please, change device configuration parameters and run program again... " );

        for ( ; ; );
    }

    manchester_counter = 0;
    log_info( &logger, " Application Task " );
}

Application Task

Reads clock pin and gets samples of data pin state, converts it in manchester data that stores in buffer. When it fills out manchester buffer checks if expected preamble data is received. If it is checks the next byte(it should be received data length). Then parses rest of data and if it's correct shows it on log.


void application_task ( void )
{    
    if ( ismrx3_get_clk( &ismrx3 ) )
    {
        sample = ismrx3_get_data( &ismrx3 );
        if ( last_sample == sample )
        {
            consecutive++; 
        }
        else
        {
            if ( consecutive < 4 )//Single sample
            {
                manchester_buf[ manchester_counter++ ] = last_sample + 48;//Convert to ascii 1/0
            }
            else if ( consecutive < 6 )//Two samples
            {
                manchester_buf[ manchester_counter++ ] = last_sample + 48;//Convert to ascii 1/0
                manchester_buf[ manchester_counter++ ] = last_sample + 48;//Convert to ascii 1/0
            }
            consecutive = 1;
            last_sample = sample;
        }

        while ( ismrx3_get_clk( &ismrx3 ) );
    }

    if ( manchester_counter >= MANCHESTER_BUF_LEN - 1 )
    {
        parse_samples(  ); 
        manchester_counter = 0;
    }
}

Note

  • The expected data that is received is:

    _PREAMBLEWORD(2bytes), _DATALENGTH(1byte), DATA(1..255bytes)

  • By default _PREAMBLEWORD is set to be 0xAAAA.

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

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

M-BUS RF 2 Click

0

M-BUS RF 2 Click is a compact add-on board designed for utility metering and various telemetry applications. This board features the Metis-I (2605041183000), an 868MHz radio module from Würth Elektronik. It integrates an MSP430 microcontroller and a CC1101 RF chip-set to ensure efficient data transmission. Key features include a frequency range of 868.3MHz to 869.525MHz, support for the Wireless M-BUS EN13757-4:2013 and Open Metering System (OMS) standards, and communication capabilities up to 700 meters in clear conditions.

[Learn More]

DAC 10 Click

0

DAC 10 Click is a compact add-on board that contains a fully-featured, highly accurate digital-to-analog converter. This board features the DAC53401, a 10-bit voltage-output smart digital-to-analog converter from Texas Instruments.

[Learn More]

10x10 RGB 2 Click

0

10x10 RGB 2 Click is a compact add-on board designed for creating vibrant LED displays and lighting solutions. This board features the IN-PC20TBT5R5G5B, an RGB LED with an advanced IC for seamless operation from Inolux. The board features a 10x10 matrix of smart RGB LEDs capable of dual-wire transmission and a sophisticated control circuit for dynamic color rendering. It incorporates CMOS technology for low power consumption and supports 256 grayscale levels for precise PWM dimming, along with 32 levels of brightness control.

[Learn More]