TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (91 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 (139266 times)
  2. FAT32 Library (71754 times)
  3. Network Ethernet Library (57128 times)
  4. USB Device Library (47432 times)
  5. Network WiFi Library (43092 times)
  6. FT800 Library (42408 times)
  7. GSM click (29835 times)
  8. mikroSDK (28101 times)
  9. PID Library (26886 times)
  10. microSD click (26198 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

NTAG 5 Link Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.13

mikroSDK Library: 2.0.0.0

Category: RFID/NFC

Downloaded: 262 times

Not followed.

License: MIT license  

NTAG 5 Link Click is a compact add-on board that acts as a bridge between an NFC-enabled device and any I2C slave, such as a sensor or external memory. This board features the NTA5332, a highly integrated NFC IC which creates a secure standard-based link from the device to the cloud from NXP Semiconductors. Based on the NTAG 5 switch and operating at 13.56MHz, the NTA5332 represents an NFC Forum-compliant contactless tag that can be read and written by an NFC-enabled device at close range and by an ISO/IEC 15693-enabled industrial reader over a more extended range. It also incorporates an I2C interface with an I2C master features and AES mutual authentication, SRAM memory, and energy harvesting possibility, which means it can supply power to other components in the system.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "NTAG 5 Link Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "NTAG 5 Link Click" changes.

Do you want to report abuse regarding "NTAG 5 Link Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


NTAG 5 Link Click

NTAG 5 Link Click is a compact add-on board that acts as a bridge between an NFC-enabled device and any I2C slave, such as a sensor or external memory. This board features the NTA5332, a highly integrated NFC IC which creates a secure standard-based link from the device to the cloud from NXP Semiconductors. Based on the NTAG 5 switch and operating at 13.56MHz, the NTA5332 represents an NFC Forum-compliant contactless tag that can be read and written by an NFC-enabled device at close range and by an ISO/IEC 15693-enabled industrial reader over a more extended range. It also incorporates an I2C interface with an I2C master features and AES mutual authentication, SRAM memory, and energy harvesting possibility, which means it can supply power to other components in the system.

ntag5link_click.png

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Feb 2022.
  • Type : I2C type

Software Support

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

Standard key functions :

  • ntag5link_cfg_setup Config Object Initialization function.

    void ntag5link_cfg_setup ( ntag5link_cfg_t *cfg );
  • ntag5link_init Initialization function.

    err_t ntag5link_init ( ntag5link_t *ctx, ntag5link_cfg_t *cfg );
  • ntag5link_default_cfg Click Default Configuration function.

    err_t ntag5link_default_cfg ( ntag5link_t *ctx );

Example key functions :

  • ntag5link_write_ndef_uri_record This function writes specific NDEF URI record to the memory address specified with NTAG5LINK_NDEF_MESSAGE_START_ADDRESS macro.

    err_t ntag5link_write_ndef_uri_record ( ntag5link_t *ctx, uint8_t uri_prefix, uint8_t *uri_data, uint8_t data_len );
  • ntag5link_write_message_to_memory This function writes specified number of data bytes to the user memory starting from block_addr.

    err_t ntag5link_write_message_to_memory ( ntag5link_t *ctx, uint16_t block_addr, uint8_t *message, uint16_t message_len );
  • ntag5link_read_message_from_memory This function reads specified number of data bytes from the user memory starting from @b block_addr.

    err_t ntag5link_read_message_from_memory ( ntag5link_t *ctx, uint16_t block_addr, uint8_t *message, uint16_t message_len );

Example Description

This example demonstrates the use of NTAG 5 Link Click board by programming the specified NDEF URI record to the memory, and showing the memory read/write feature.

The demo application is composed of two sections :

Application Init

Initializes the driver and logger and performs the Click default configuration which enables the device and formats its user memory. After that it programs the specified NDEF URI record to the memory.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    ntag5link_cfg_t ntag5link_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.
    ntag5link_cfg_setup( &ntag5link_cfg );
    NTAG5LINK_MAP_MIKROBUS( ntag5link_cfg, MIKROBUS_1 );
    if ( I2C_MASTER_ERROR == ntag5link_init( &ntag5link, &ntag5link_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( NTAG5LINK_ERROR == ntag5link_default_cfg ( &ntag5link ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

    if ( NTAG5LINK_OK == ntag5link_write_ndef_uri_record ( &ntag5link, NTAG5LINK_URI_PREFIX_4, 
                                                           URI_DATA, strlen ( URI_DATA ) ) )
    {
        log_printf( &logger, " NDEF URI record \"https://%s\" has been written\r\n", ( char * ) URI_DATA );
    }

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

Application Task

Writes a desired number of data bytes to the memory and verifies that it is written correctly by reading from the same memory location and displaying the memory content on the USB UART approximately every 5 seconds.

void application_task ( void )
{
    uint8_t message_buf[ 100 ] = { 0 };
    if ( NTAG5LINK_OK == ntag5link_write_message_to_memory ( &ntag5link, 
                                                             TEXT_MESSAGE_ADDRESS, 
                                                             TEXT_MESSAGE, 
                                                             strlen ( TEXT_MESSAGE ) ) )
    {
        log_printf( &logger, " \"%s\" has been written to memory address 0x%.4X \r\n", 
                    ( char * ) TEXT_MESSAGE, ( uint16_t ) TEXT_MESSAGE_ADDRESS );
    }
    if ( NTAG5LINK_OK == ntag5link_read_message_from_memory ( &ntag5link, 
                                                              TEXT_MESSAGE_ADDRESS, 
                                                              message_buf, 
                                                              strlen ( TEXT_MESSAGE ) ) )
    {
        log_printf( &logger, " \"%s\" has been read from memory address 0x%.4X \r\n\n", 
                    message_buf, ( uint16_t ) TEXT_MESSAGE_ADDRESS );
    }
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
}

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

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

ROTARY R Click

0

Rotary Click carries a 15-pulse incremental rotary encoder with detents, surrounded by a ring of 16 red LEDs. It’s a perfect solution for adding a precision input knob to your design. The encoder outputs A and B signals (out of phase to each other); the knob also acts as a push-button which sends an interrupt to the target board MCU. The LED ring is controlled through SPI lines (CS, SCK, MISO, MOSI). Rotary Click can be used with either a 3.3V or 5V power supply.

[Learn More]

Hz to V Click

0

HZ to V Click is a device that can converts input frequency of the signal with virtually any wave shape to a DC voltage output, with a level proportional to the input frequency. It has a linear response, and by applying a signal with the frequency between 1kHz to 10kHz on its input, the Click board™ will generate a DC voltage, ranging from 0.33V to 3.3V.

[Learn More]

Vibro Motor 3 click

5

Vibro Motor 3 Click is a compact add-on board that makes an ideal solution for adding simple haptic feedback in any design.

[Learn More]