TOP Contributors

  1. MIKROE (2659 codes)
  2. Alcides Ramos (356 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 (136941 times)
  2. FAT32 Library (70063 times)
  3. Network Ethernet Library (56015 times)
  4. USB Device Library (46330 times)
  5. Network WiFi Library (41945 times)
  6. FT800 Library (41264 times)
  7. GSM click (29050 times)
  8. mikroSDK (26465 times)
  9. PID Library (26442 times)
  10. microSD click (25402 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

NFC 5 click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-08

Package Version: 2.1.0.2

mikroSDK Library: 2.0.0.0

Category: RFID/NFC

Downloaded: 19 times

Not followed.

License: MIT license  

NFC 5 Click is a compact add-on board designed for advanced NFC applications. This board features the ST25R3918, a multipurpose NFC transceiver from STMicroelectronics. This Click board™ is built to cater to the growing needs of the Internet of Things (IoT) ecosystem, providing robust NFC reader functionalities, passive peer-to-peer communication, and card emulation modes with outstanding analog performance. Its notable features include exceptional read range with minimal power output, advanced noise reduction, and compatibility with ISO14443, ISO15693, and NFC Forum Tag types 1, 2, 4, and 5.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "NFC 5 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "NFC 5 click" changes.

Do you want to report abuse regarding "NFC 5 click".

  • Information
  • Comments (0)

mikroSDK Library Blog


NFC 5 click

NFC 5 Click is a compact add-on board designed for advanced NFC applications. This board features the ST25R3918, a multipurpose NFC transceiver from STMicroelectronics. This Click board™ is built to cater to the growing needs of the Internet of Things (IoT) ecosystem, providing robust NFC reader functionalities, passive peer-to-peer communication, and card emulation modes with outstanding analog performance. Its notable features include exceptional read range with minimal power output, advanced noise reduction, and compatibility with ISO14443, ISO15693, and NFC Forum Tag types 1, 2, 4, and 5.

nfc5_click.png

click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Nov 2023.
  • Type : I2C/SPI type

Software Support

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

Standard key functions :

  • nfc5_cfg_setup Config Object Initialization function.

    void nfc5_cfg_setup ( nfc5_cfg_t *cfg );
  • nfc5_init Initialization function.

    err_t nfc5_init ( nfc5_t *ctx, nfc5_cfg_t *cfg );
  • nfc5_default_cfg Click Default Configuration function.

    err_t nfc5_default_cfg ( nfc5_t *ctx );

Example key functions :

  • nfc5_get_mifare_tag_uid This function reads the UID of a mifare tag.

    err_t nfc5_get_mifare_tag_uid ( nfc5_t *ctx, uint8_t *uid, uint8_t *uid_len );
  • nfc5_write_reg This function writes a desired data to the selected register.

    err_t nfc5_write_reg ( nfc5_t *ctx, uint8_t reg, uint8_t data_in );
  • nfc5_read_reg This function reads a desired data from the selected register.

    err_t nfc5_read_reg ( nfc5_t *ctx, uint8_t reg, uint8_t *data_out );

Example Description

This example demonstrates the use of NFC 4 Click board by reading MIFARE ISO/IEC 14443 type A tag UID.

The demo application is composed of two sections :

Application Init

Initializes the driver and performs the click default configuration.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    nfc5_cfg_t nfc5_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.
    nfc5_cfg_setup( &nfc5_cfg );
    NFC5_MAP_MIKROBUS( nfc5_cfg, MIKROBUS_1 );
    err_t init_flag = nfc5_init( &nfc5, &nfc5_cfg );
    if ( ( I2C_MASTER_ERROR == init_flag ) || ( SPI_MASTER_ERROR == init_flag ) )
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( NFC5_ERROR == nfc5_default_cfg ( &nfc5 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

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

Application Task

If there's a tag detected, it reads its UID and displays it on the USB UART every 500ms.

void application_task ( void )
{
    uint8_t tag_uid[ NFC5_NFCA_CASCADE_3_UID_LEN ] = { 0 };
    uint8_t tag_uid_len = 0;

    if ( NFC5_OK == nfc5_get_mifare_tag_uid( &nfc5, tag_uid, &tag_uid_len ) )
    {
        log_printf( &logger, " TAG UID: " );
        for ( uint8_t cnt = 0; cnt < tag_uid_len; cnt++ )
        {
            log_printf( &logger, "0x%.2X ", ( uint16_t ) tag_uid[ cnt ] );
        }
        log_printf( &logger, "\r\n----------------------------------\r\n" );
        Delay_ms ( 500 );
    }
}

Note

Only ISO14443-A type tags are compatible with this example. We recommend MIKROE-1475 - an RFiD tag 13.56MHz compliant with ISO14443-A standard.

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

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

Analog MUX 5 click

0

Analog MUX 5 Click is a compact add-on board that switches one of many inputs to one output. This board features the MAX4634, a fast, low-voltage four-channel CMOS analog multiplexer from Analog Devices. This low-voltage multiplexer operates from both mikroBUS™ power rails and features 4Ω maximum ON-resistance (RON). CMOS switch construction allows the processing of analog signals within the supply voltage range. It is also characterized by an easy way of management, only through a couple of signals from the mikroBUS™ socket. This Click board™ is suitable for various applications, from industrial and instrumentation to medical, consumer, communications, and more.

[Learn More]

Buck 14 click

5

The Buck 14 click is a Click board based around the BMR4613001/001, a PoL regulator from Flex. It's igh-efficiency step-down converter which provides a highly regulated output voltage derived from the connected power source, rated from 4.5 to 14V.

[Learn More]

UT-M 7-SEG R click

0

UT-M 7-SEG R click carries two SMD ultra thin LED 7-SEG displays and the MAX6969 constant-current LED driver from Maxim Integrated. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target microcontroller over SPI interface.

[Learn More]