ISM RX 2 click
ISM RX 2 Click is a compact add-on board that contains a pin configurable, low current, sub-GHz EZRadio® receiver. This board features the Si4356, a standalone Sub-GHz RF receiver IC, from Silicon Labs, which provides a true plug-and-play receive option.
click Product page
Click library
- Author : Stefan Ilic
- Date : Feb 2023.
- Type : GPIO type
Software Support
We provide a library for the ISM RX 2 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 ISM RX 2 Click driver.
Standard key functions :
ismrx2_cfg_setup
Config Object Initialization function.
void ismrx2_cfg_setup(ismrx2_cfg_t *cfg)
ISM RX 2 configuration object setup function.
ISM RX 2 Click configuration object.
Definition: ismrx2.h:102
ismrx2_init
Initialization function.
err_t ismrx2_init(ismrx2_t *ctx, ismrx2_cfg_t *cfg)
ISM RX 2 initialization function.
ISM RX 2 Click context object.
Definition: ismrx2.h:88
ismrx2_default_cfg
Click Default Configuration function.
err_t ismrx2_default_cfg(ismrx2_t *ctx)
ISM RX 2 default configuration function.
Example key functions :
ismrx2_get_data_pin_state
ISM RX 2 get state of DATA pin function.
uint8_t ismrx2_get_data_pin_state(ismrx2_t *ctx)
ISM RX 2 get state of DATA pin function.
ismrx2_read_manchester_data
ISM RX 2 read manchester encoded data function.
err_t ismrx2_read_manchester_data(ismrx2_t *ctx, uint8_t *data_out)
ISM RX 2 read manchester encoded data function.
ismrx2_read_rf_data
ISM RX 2 read data function.
err_t ismrx2_read_rf_data(ismrx2_t *ctx, uint8_t *data_out)
ISM RX 2 read data function.
Example Description
This application shows capability of ISM RX 2 Click board.
The demo application is composed of two sections :
Application Init
Initialize GPIO pins and LOG module and sets default configuration.
{
log_cfg_t log_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
if ( DIGITAL_OUT_UNSUPPORTED_PIN ==
ismrx2_init( &ismrx2, &ismrx2_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
}
#define ISMRX2_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition: ismrx2.h:74
@ ISMRX2_ERROR
Definition: ismrx2.h:117
void application_init(void)
Definition: main.c:38
Application Task
Wait for the data pin to go down and start sampling and wait for sync word if it's received
collect data to buffer till it receives 0 byte
{
#ifdef DEFAULT_EXAMPLE
uint8_t read_data[ 8 ] = { 0 };
{
err_t error_flag;
{
log_printf( &logger, " RX data: " );
for ( uint8_t n_cnt = 0; n_cnt < strlen( read_data ); n_cnt++ )
{
if ( read_data[ n_cnt ] != '\0' )
{
log_printf( &logger, "%c", read_data[n_cnt] );
}
}
log_printf( &logger, "\r\n*********************\r\n" );
Delay_ms( 10 );
}
}
#endif
#ifdef MANCHESTER_EXAMPLE
uint8_t read_data[ 16 ] = { 0 };
{
{
log_printf( &logger, " Read data: " );
for ( uint8_t n_cnt = 1; n_cnt < strlen(read_data); n_cnt++ )
{
log_printf( &logger, "%c", read_data[ n_cnt ] );
}
log_printf( &logger, "\r\n*********************\r\n" );
Delay_ms( 10 );
}
}
#endif
}
#define ISMRX2_PIN_STATE_LOW
Definition: ismrx2.h:53
@ ISMRX2_OK
Definition: ismrx2.h:116
void application_task(void)
Definition: main.c:72
Note
Application task is broken down into two parts:
DEFAULT_EXAMPLE - Collects data from the OOK TX Click board and displays it on the USB UART terminal. MANCHESTER_EXAMPLE - Collects Manchester encoded data from the ISM TX Click board, decodes it and displays it on the USB UART terminal.
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.ISMRX2
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.