TOP Contributors

  1. MIKROE (2751 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 (139060 times)
  2. FAT32 Library (71592 times)
  3. Network Ethernet Library (56989 times)
  4. USB Device Library (47330 times)
  5. Network WiFi Library (43006 times)
  6. FT800 Library (42297 times)
  7. GSM click (29777 times)
  8. mikroSDK (27874 times)
  9. PID Library (26858 times)
  10. microSD click (26129 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

MICRF RX Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.5

mikroSDK Library: 2.0.0.0

Category: Sub-1 GHz Transceivers

Downloaded: 56 times

Not followed.

License: MIT license  

MICRF RX Click is a compact add-on board for high-sensitivity applications, including remote keyless entry, tire pressure monitoring systems, and remote actuation systems. This board features the MICRF220, an ASK/OOK 315MHz receiver with RSSI and squelch capabilities from Microchip to offer top-notch RF performance. This super-heterodyne, image-reject RF receiver provides a -110dBm sensitivity at 1kbps and a 0.1% Bit Error Rate (BER), supporting adjustable demodulator filter bandwidths for bit rates up to 14.4kbps.

No Abuse Reported

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

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

Do you want to report abuse regarding "MICRF RX Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


MICRF RX Click

MICRF RX Click is a compact add-on board for high-sensitivity applications, including remote keyless entry, tire pressure monitoring systems, and remote actuation systems. This board features the MICRF220, an ASK/OOK 315MHz receiver with RSSI and squelch capabilities from Microchip to offer top-notch RF performance. This super-heterodyne, image-reject RF receiver provides a -110dBm sensitivity at 1kbps and a 0.1% Bit Error Rate (BER), supporting adjustable demodulator filter bandwidths for bit rates up to 14.4kbps.

micrfrx_click.png

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Nov 2023.
  • Type : GPIO type

Software Support

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

Standard key functions :

  • micrfrx_cfg_setup Config Object Initialization function.

    void micrfrx_cfg_setup ( micrfrx_cfg_t *cfg );
  • micrfrx_init Initialization function.

    err_t micrfrx_init ( micrfrx_t *ctx, micrfrx_cfg_t *cfg );

Example key functions :

  • micrfrx_enable_device This function enables device by setting the SHD pin to low logic state.

    void micrfrx_enable_device ( micrfrx_t *ctx );
  • micrfrx_wait_ready This function waits for all training bytes to arrive which indicates data ready.

    static void micrfrx_wait_ready ( micrfrx_t *ctx );
  • micrfrx_read_packet This function reads data packet and stores it in a packet_buf only if the MICRFRX_PREAMBLE bytes are received successfully.

    static uint8_t micrfrx_read_packet ( micrfrx_t *ctx );

Example Description

This example demonstrates the use of MICRF RX Click board by reading and parsing packet messages received from the transmitter.

The demo application is composed of two sections :

Application Init

Initializes the driver and enables the device and squelch mode.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    micrfrx_cfg_t micrfrx_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.
    micrfrx_cfg_setup( &micrfrx_cfg );
    MICRFRX_MAP_MIKROBUS( micrfrx_cfg, MIKROBUS_1 );
    if ( DIGITAL_OUT_UNSUPPORTED_PIN == micrfrx_init( &micrfrx, &micrfrx_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    micrfrx_enable_squelch ( &micrfrx );
    micrfrx_enable_device ( &micrfrx );

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

Application Task

Waits for a data ready indication, then reads all packet data, verifies the CRC bytes in a packet, and displays its data as well as the RSSI value on the USB UART.

void application_task ( void )
{
    static float rssi_v = 0;
    static uint8_t packet_len = 0;
    static uint8_t msg_cnt = 0;
    static uint16_t crc = 0;

    log_printf( &logger, "\r\n Waiting for data ready...\r\n" );
    micrfrx_wait_ready ( &micrfrx );
    packet_len = micrfrx_read_packet ( &micrfrx );
    if ( packet_len )
    {
        micrfrx_read_rssi_voltage ( &micrfrx, &rssi_v );
        crc = ( ( uint16_t ) packet_buf[ packet_len - 2 ] << 8 ) | packet_buf[ packet_len - 1 ];
        if ( crc == micrftx2_calculate_crc16 ( packet_buf, packet_len - 2 ) )
        {
            log_printf( &logger, " Received message: " );
            for ( msg_cnt = 0; msg_cnt < packet_buf[ 2 ]; msg_cnt++ )
            {
                log_printf( &logger, "%c", ( uint16_t ) packet_buf[ msg_cnt + 3 ] );
            }
            log_printf( &logger, "\r\n RSSI: %.1f dBm\r\n", MICRFRX_RSSI_V_TO_DBM ( rssi_v ) );
        }
    }
    Delay_ms ( 100 );
}

Note

The MICRF TX Click board is a compatible transmitter for the MICRF RX Click. Here are a few steps for troubleshooting if you are experiencing issues running this example:

  • Make sure the MICRF TX Click is set to ASK mode with on-board jumpers.
  • Check the MCU clock configuration, use an external oscillator instead of the MCU's internal one for better accuracy on manchester data rate delay.
  • Measure the actual data rate on the data line and adjust the MICRFRX_MAN_BIT_LEN_US value accordingly.

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

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.


ALSO FROM THIS AUTHOR

ADC Click

1

ADC Click carries the MCP3204 12-bit Analog-to-Digital converter. The Click is designed to run on 3.3V by default. Place PWR SEL SMD jumper to 5V position if used with 5V systems.

[Learn More]

Pressure 3 Click

0

Pressure 3 Click is a mikroBUS add-on board that carries an Infineon DPS310 digital barometric pressure sensor. It has an operating range from 300 to 1200 hPa with a relative accuracy of 0.06 hPa and absolute accuracy of 1 hPa.

[Learn More]

Expand 17 Click

0

Expand 17 Click is a compact add-on board designed to expand the number of input/output pins in your system. This board features the TCAL6408, an 8-bit I/O expander from Texas Instruments, which communicates via the I2C protocol. The TCAL6408 features programmable output drive strength, latchable inputs, pull-up/pull-down resistors, and configurable open-drain or push-pull outputs, offering flexible and enhanced I/O performance with minimal power consumption and reduced EMI.

[Learn More]