TOP Contributors

  1. MIKROE (2662 codes)
  2. Alcides Ramos (357 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 (137032 times)
  2. FAT32 Library (70161 times)
  3. Network Ethernet Library (56033 times)
  4. USB Device Library (46355 times)
  5. Network WiFi Library (41970 times)
  6. FT800 Library (41299 times)
  7. GSM click (29078 times)
  8. mikroSDK (26518 times)
  9. PID Library (26452 times)
  10. microSD click (25444 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 Tag 4 click

Rating:

5

Author: MIKROE

Last Updated: 2019-07-11

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: RFID/NFC

Downloaded: 3195 times

Not followed.

License: MIT license  

NFC Tag 4 Click is NFC RFID tag device, offering 16 Kbit of electrically erasable programmable memory (EEPROM). This Click Board offer two communication interfaces. The first one is an I2C serial link and can be operated from a DC power supply.

No Abuse Reported

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

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

Do you want to report abuse regarding "NFC Tag 4 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

NFC Tag 4 click

NFC Tag 4 click

Native view of the NFC Tag 4 click board.

View full image
NFC Tag 4 click

NFC Tag 4 click

Front and back view of the NFC Tag 4 click board.

View full image

Library Description

Library contains function for getting INT pin state Library contains function for setting CS pin state Library contains function for getting register values Library contains function for setting register values Library contains function for device initialization Library contains function for getting temperature value Library contains function for getting axes values Library contains function for software reset Library contains functions for setting power mode and full scale range

Key functions:

  • uint8_t nfctag4_password_present( uint8_t * password_bytes ) - presents password to device in order to open I2C security session.
  • uint8_t nfctag4_init( void ) - initializes the device.
  • uint8_t nfctag4_enable_mailbox( uint8_t enable_mailbox ) - enables or disables mailbox functionality.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes GPIO pins, I2C and LOG modules.
  • Application Initialization - Initializes I2C driver, presents password to the device and initializes the device.
  • Application Task - Checks if RF placed a message to mailbox and if it did, checks message length and logs message bytes.
void applicationTask( )
{
    nfctag4_wait_for_int( );
    nfctag4_i2c_get( _NFCTAG4_MEMORY_DYNAMIC, _NFCTAG4_DYNAMIC_REG_MB_CTRL, &aux_buffer[0], 1 );

    if (( aux_buffer[0] & 0x04 ) == ( 0x04 ))
    {
        nfctag4_wait_for_int( );
        nfctag4_i2c_get( _NFCTAG4_MEMORY_DYNAMIC, _NFCTAG4_DYNAMIC_REG_MB_LEN, &aux_buffer[0], 1 );
        message_length = aux_buffer[0];
        message_length++;
        nfctag4_wait_for_int( );
        nfctag4_i2c_get( _NFCTAG4_MEMORY_MAILBOX, _NFCTAG4_MAILBOX_REG_BYTE_0, &aux_buffer[0], message_length );

        mikrobus_logWrite( " ", _LOG_LINE );
        mikrobus_logWrite( "> ********* MESSAGE ********* <", _LOG_LINE );

        ByteToStr( message_length, text );
        mikrobus_logWrite( "> Message length : ", _LOG_TEXT );
        mikrobus_logWrite( text, _LOG_TEXT );
        mikrobus_logWrite( " [Bytes]", _LOG_LINE );

        for (i = 0; i < message_length; i ++)
        {
            ByteToStr( i, text );
            mikrobus_logWrite( text, _LOG_TEXT );
            mikrobus_logWrite( " : ", _LOG_TEXT );

            ByteToHex( aux_buffer[ i ], text );
            mikrobus_logWrite( "0x", _LOG_TEXT );
            mikrobus_logWrite( text, _LOG_LINE );
        }

        mikrobus_logWrite( "> *********** END *********** <", _LOG_LINE );
    }
}

Additional Functions :

  • nfctag4_wait_for_int( ) - waits for INT pin to go LOW and than HIGH for time period of 300ms.

Other mikroE Libraries used in the example:

  • I2C
  • UART
  • Conversions

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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

BLE 3 click

0

BLE 3 click is a Bluetooth Low Energy radio module which carries u-blox's NINA-B1 radio. The click can communicate with a target MCU through UART, SPI or I2C.

[Learn More]

M-BUS RF 4 click

0

M-BUS RF 4 Click is a mikroBUS™ add-on board with a MIPOT 32001324 RF wireless transceiver. This module operates in the 868 MHz SRD Band. Thanks to its small LCC form factor (15 x 25 mm only) and its low power consumption this module allows the implementation of highly integrated low power (battery operated) solutions for water, gas, heat or electricity metering applications, both on meter or concentrator devices.

[Learn More]

LED Flash click

0

LED Flash click functions as a high power LED flash, and carries the CAT3224 flash LED driver. The click is designed to run on a 5V power supply. It communicates with the target microcontroller over the following pins on the mikroBUS line: AN, RST, PWM, and INT.

[Learn More]