TOP Contributors

  1. MIKROE (2784 codes)
  2. Alcides Ramos (385 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 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 (139842 times)
  2. FAT32 Library (72209 times)
  3. Network Ethernet Library (57392 times)
  4. USB Device Library (47740 times)
  5. Network WiFi Library (43364 times)
  6. FT800 Library (42700 times)
  7. GSM click (29980 times)
  8. mikroSDK (28440 times)
  9. PID Library (26989 times)
  10. microSD click (26398 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 3 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.6

mikroSDK Library: 2.0.0.0

Category: RFID/NFC

Downloaded: 171 times

Not followed.

License: MIT license  

NFC 3 Click is a compact add-on board that contains an NFC transceiver for contactless communication at 13.56MHz. This board features the PN5180A0HN, a highly integrated high-performance full NFC Forum-compliant frontend from NXP Semiconductors. The PN5180A0HN utilizes an outstanding modulation and demodulation concept for different contactless communication methods and protocols. It is fully compliant with many Reader/Writer standards (ISO 14443A/B, ISO 15693, ISO 18092, and more), alongside support for reading all NFC tag types (type 1, 2, 3, 4A, and 4B). Besides the SPI host interface, it also features high RF output power to drive an antenna etched on the PCB directly, besides its tuning circuit, at high efficiency.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "NFC 3 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "NFC 3 Click" changes.

Do you want to report abuse regarding "NFC 3 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


NFC 3 Click

NFC 3 Click is a compact add-on board that contains an NFC transceiver for contactless communication at 13.56MHz. This board features the PN5180A0HN, a highly integrated high-performance full NFC Forum-compliant frontend from NXP Semiconductors. The PN5180A0HN utilizes an outstanding modulation and demodulation concept for different contactless communication methods and protocols. It is fully compliant with many Reader/Writer standards (ISO 14443A/B, ISO 15693, ISO 18092, and more), alongside support for reading all NFC tag types (type 1, 2, 3, 4A, and 4B). Besides the SPI host interface, it also features high RF output power to drive an antenna etched on the PCB directly, besides its tuning circuit, at high efficiency.

nfc3_click.png

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Feb 2021.
  • Type : SPI type

Software Support

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

Standard key functions :

  • nfc3_cfg_setup Config Object Initialization function.

    void nfc3_cfg_setup ( nfc3_cfg_t *cfg );
  • nfc3_init Initialization function.

    err_t nfc3_init ( nfc3_t *ctx, nfc3_cfg_t *cfg );
  • nfc3_reset NFC 3 reset function.

    void nfc3_reset ( nfc3_t *ctx );

Example key functions :

  • nfc3_read_card_uid NFC 3 read card UID function.

    uint8_t nfc3_read_card_uid ( nfc3_t *ctx, uint8_t *data_out );
  • nfc3_read_firmware_version NFC 3 reading firmware version function.

    err_t nfc3_read_firmware_version ( nfc3_t *ctx, uint16_t *data_out );
  • nfc3_read_eeprom_version NFC 3 reading EEPROM version function.

    err_t nfc3_read_eeprom_version ( nfc3_t *ctx, uint16_t *data_out );

Example Description

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

The demo application is composed of two sections :

Application Init

Initializes driver and logger, then enables the Click board and reads the device product, firmware and eeprom versions.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    nfc3_cfg_t nfc3_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.

    nfc3_cfg_setup( &nfc3_cfg );
    NFC3_MAP_MIKROBUS( nfc3_cfg, MIKROBUS_1 );
    err_t init_flag = nfc3_init( &nfc3, &nfc3_cfg );
    if ( init_flag == SPI_MASTER_ERROR ) 
    {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );
        for ( ; ; );
    }

    nfc3_reset ( &nfc3 );
    Delay_ms ( 100 );

    log_printf( &logger, "------------------------\r\n" );
    nfc3_read_product_version ( &nfc3, &info );
    log_printf( &logger, "Product version: 0x%.4X\r\n", info );
    nfc3_read_firmware_version ( &nfc3, &info );
    log_printf( &logger, "Firmware version: 0x%.4X\r\n", info );
    nfc3_read_eeprom_version ( &nfc3, &info );
    log_printf( &logger, "EEPROM version: 0x%.4X\r\n", info );
    log_printf( &logger, "------------------------\r\n" );
    log_info( &logger, " Application Task " );
    log_printf( &logger, "------------------------\r\n" );
    Delay_ms ( 1000 );
}

Application Task

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


void application_task ( void )
{
    uint8_t uid[ 7 ];
    uint8_t uid_len;
    uid_len = nfc3_read_card_uid( &nfc3, uid );
    if ( uid_len > 0 )
    {
        log_printf( &logger, "Tag UID: " );
        for ( uint8_t cnt = 0; cnt < uid_len; cnt++ )
        {
            log_printf( &logger, "0x%.2X ", ( uint16_t ) uid[ cnt ] );
        }
        log_printf( &logger, "\r\n------------------------\r\n" );
        Delay_ms ( 1000 );
    }
}

Note

Only tags with 4-byte or 7-byte UIDs 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.NFC3

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. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.


ALSO FROM THIS AUTHOR

Charger 6 Click

0

Charger 6 Click is a compact add-on board that represents a single-cell battery charger. This board features the BQ25601, an I2C controlled battery charger for high input voltage and narrow voltage DC power path management from Texas Instruments. This buck charger supports USB, and it’s optimized for USB voltage input. The low impedance power path optimizes switch-mode operation efficiency, reduces battery charging time, and extends battery life during discharge. It also has a programmable current limiting, allowing it to use an external power supply rated up to 13.5V. This Click board™ is suitable as a Li-Ion and Li-polymer battery charger for portable devices and accessories, power tools, and more.

[Learn More]

7seg Click

0

7seg Click is an accessory board in mikroBUS form factor. It’s a compact and easy solution for adding 2-digit seven-segment display to your device.

[Learn More]

MCP1664 click

1

MCP1664 click contains 4 high-power white LEDs. It carries the MCP1664, a high-voltage step-up LED driver from Microchip. MCP1664 click is designed to run on either 3.3V or 5V power supply. It communicates with the target board microcontroller over the PWM pin on the mikroBUS line.

[Learn More]