TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (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 (137094 times)
  2. FAT32 Library (70234 times)
  3. Network Ethernet Library (56120 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42068 times)
  6. FT800 Library (41384 times)
  7. GSM click (29111 times)
  8. mikroSDK (26561 times)
  9. PID Library (26489 times)
  10. microSD click (25486 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

Magic RFID click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.10

mikroSDK Library: 2.0.0.0

Category: RFID/NFC

Downloaded: 91 times

Not followed.

License: MIT license  

Magic RFID Click is a compact add-on board that contains an embedded RFID module. This board features the M6E-NANO, UHF RFID module with ultra-low power consumption from JADAK. Supporting the EPC Gen2V2 and ISO 18000-63 standard, the M6E-NANO module is available for global use. It operates in the Ultra High Frequency (UHF) band in a range from 859 up to 930MHz and can be used for write/read applications.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Magic RFID click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Magic RFID click" changes.

Do you want to report abuse regarding "Magic RFID click".

  • mikroSDK Library 1.0.0.0
  • Comments (0)

mikroSDK Library Blog


Magic RFID click

Magic RFID Click is a compact add-on board that contains an embedded RFID module. This board features the M6E-NANO, UHF RFID module with ultra-low power consumption from JADAK. Supporting the EPC Gen2V2 and ISO 18000-63 standard, the M6E-NANO module is available for global use. It operates in the Ultra High Frequency (UHF) band in a range from 859 up to 930MHz and can be used for write/read applications.

magic_rfid_click.png

click Product page


Click library

  • Author : MikroE Team
  • Date : Sep 2021.
  • Type : UART type

Software Support

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

Standard key functions :

  • magicrfid_cfg_setup Config Object Initialization function.

    void magicrfid_cfg_setup ( magicrfid_cfg_t *cfg );
  • magicrfid_init Initialization function.

    err_t magicrfid_init ( magicrfid_t *ctx, magicrfid_cfg_t *cfg );
  • magicrfid_default_cfg Click Default Configuration function.

    void magicrfid_default_cfg ( magicrfid_t *ctx );

Example key functions :

  • magicrfid_get_response Magic RFID get response function.

    err_t magicrfid_get_response ( magicrfid_t *ctx, magicrfid_response_t *rsp );
  • magicrfid_parse_tag_rssi This function parses RSSI value of the tag.

    int8_t magicrfid_parse_tag_rssi ( magicrfid_response_t rsp );
  • magicrfid_parse_tag_epc This function parses EPC bytes of the tag.

    void magicrfid_parse_tag_epc ( magicrfid_response_t rsp, magicrfid_epc_t *epc );

Example Description

This example reads and processes data from Magic RFID clicks.

The demo application is composed of two sections :

Application Init

Initialize driver init and starts default configuration module.


void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    magicrfid_cfg_t magicrfid_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.
    magicrfid_cfg_setup( &magicrfid_cfg );
    MAGICRFID_MAP_MIKROBUS( magicrfid_cfg, MIKROBUS_1 );
    if ( UART_ERROR == magicrfid_init( &magicrfid, &magicrfid_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }
    magicrfid_default_cfg ( &magicrfid );
    log_info( &logger, " Application Task " );
}

Application Task

Scans for RFID TAGs and displays on the USB UART the EPC bytes of the detected tag. It also parses and displays the RSSI as well as the frequency this tag was detected at.


void application_task ( void ) 
{
    magicrfid_response_t rsp = { 0 };
    if ( ( MAGICRFID_OK == magicrfid_get_response ( &magicrfid, &rsp ) ) && 
         ( MAGICRFID_OPCODE_READ_TAG_ID_MULTIPLE == rsp.opcode ) )
    {
        if ( 0 == rsp.data_len )
        {
            log_printf( &logger, "\r\n --- SCANNING ---\r\n" );
        }
        else
        {
            log_printf( &logger, "\r\n --- TAG DETECTED ---\r\n" );
            int8_t tag_rssi = 0;
            uint32_t tag_freq = 0;
            magicrfid_epc_t epc = { 0 };
            tag_rssi = magicrfid_parse_tag_rssi ( rsp );
            log_printf( &logger, " RSSI: %d\r\n", ( int16_t ) tag_rssi );
            tag_freq = magicrfid_parse_tag_freq ( rsp );
            log_printf( &logger, " FREQ: %lu\r\n", tag_freq );
            magicrfid_parse_tag_epc ( rsp, &epc );
            log_printf( &logger, " EPC PC: 0x%.4X\r\n", epc.epc_pc );
            log_printf( &logger, " EPC ID (len: %u): ", ( uint16_t ) epc.data_len );
            for ( uint8_t cnt = 0; cnt < epc.data_len; cnt++ )
            {
                log_printf( &logger, "%.2X", ( uint16_t ) epc.data_buf[ cnt ] );
            }
            log_printf( &logger, "\r\n EPC CRC: 0x%.4X\r\n", epc.epc_crc );
            Delay_ms ( 100 );
            magicrfid_clear_buffers ( &magicrfid );
        }
    }
}

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

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

Heart Rate 7 click

5

Heart Rate 7 click is an optical biosensor Click board which can be used for heart-rate monitoring (HRM). This Click board employs a very sensitive analog front-end IC with high dynamic range, which ensures accurate and reliable readings.

[Learn More]

Temp-Hum 12 click

5

Temp-Hum 12 click is a smart environmental temperature and humidity sensor Click board, packed with features which allow easy and simple integration into any design that requires accurate and reliable humidity and temperature measurements.

[Learn More]

H-Bridge 9 click

0

H-Bridge 9 Click is a compact add-on board that contains six MOSFET half-bridge outputs. This board features the L99UDL01, a six-channel half-bridge driver monolithic integrated circuit that is PWM configurable and current regulated from STMicroelectronics.

[Learn More]