How does it work?
NFC Tag 5 Click as its foundation uses the M24LR64E-R, a 64-Kbit dynamic NFC/RFID tag with password protection, energy harvesting, and RF status functions from STMicroelectronics. This highly integrated Near Field Communication tag module comes with a dual-interface electrically erasable programmable memory (EEPROM), an I2C interface alongside an RF contactless interface operating at 13.56MHz, organized as 8192×8 bits in the I2C mode and 2048×32 bits in the ISO 15693 and ISO 18000-3 mode 1 RF mode.
This Click board™ contains the properly tuned integrated trace antenna on the PCB to power and access the device using the ISO/IEC 15693 and ISO 18000-3 mode 1 protocol. Power is transferred to the M24LR64E-R by radio frequency at 13.56MHz via coupling antennas.
As mentioned before, this Click board™ communicates with MCU using the standard I2C 2-Wire interface with a maximum clock frequency of 400kHz, fully adjustable through software registers. It also provides an Energy harvesting mode on the analog pin of the mikroBUS™ socket marked as VH. When the Energy harvesting mode is activated, the M24LR64E-R can output the excess energy from the RF field on the VH pin. If the RF field strength is insufficient or when the Energy harvesting mode is disabled, the VH pin goes into a high-Z state, and the Energy harvesting mode is automatically stopped.
Besides, it also features a user-configurable pin marked as BSY, routed to the AN analog pin of the mikroBUS™ socket, used either to indicate that the M24LR64E-R is executing an internal write cycle from the RF channel or that an RF command is in progress. When configured in the RF write in progress mode, the BSY pin is driven low for the entire duration of the RF internal write operation, and when configured in the RF busy mode, this pin is driven low for the whole period of the RF command progress.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
RFID/NFC
Applications
Can be used in any custom application such as industrial or medical equipment, consumer electronics, and more
On-board modules
M24LR64E-R – dynamic NFC/RFID tag IC from STMicroelectronics
Key Features
Dual interface (I2C interface and RF contactless) 64-Kbit EEPROM, password protection, energy harvesting, and RF status functions, ISO 15693 and ISO 18000-3 mode 1 compatible, and more
Interface
Analog,I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on NFC Tag 5 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | VCC SEL | Right | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
NFC Tag 5 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
External RF Signal Frequency | – | 13.56 | – | MHz |
EEPROM Size | – | 64 | – | kBit |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the NFC Tag 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 Tag 5 Click driver.
Key functions
-
nfctag5_write_ndef_uri_record
This function writes specific NDEF URI record to the memory address specified with NTAG5LINK_NDEF_MESSAGE_START_ADDRESS macro. -
nfctag5_write_message_to_memory
This function writes specified number of data bytes to the user memory starting from @b block_addr. -
nfctag5_read_message_from_memory
This function reads specified number of data bytes from the user memory starting from @b block_addr.
Example Description
This example demonstrates the use of NFC Tag 5 Click board™ by programming the specified NDEF URI record to the memory, and showing the memory read/write feature.
void application_task ( void )
{
uint8_t message_buf[ 100 ] = { 0 };
if ( NFCTAG5_OK == nfctag5_write_message_to_memory ( &nfctag5,
TEXT_MESSAGE_ADDRESS,
TEXT_MESSAGE,
strlen ( TEXT_MESSAGE ) ) )
{
log_printf( &logger, " "%s" has been written to memory address 0x%.4X rn",
( char * ) TEXT_MESSAGE, ( uint16_t ) TEXT_MESSAGE_ADDRESS );
}
if ( NFCTAG5_OK == nfctag5_read_message_from_memory ( &nfctag5,
TEXT_MESSAGE_ADDRESS,
message_buf,
strlen ( TEXT_MESSAGE ) ) )
{
log_printf( &logger, " "%s" has been read from memory address 0x%.4X rnn",
message_buf, ( uint16_t ) TEXT_MESSAGE_ADDRESS );
}
Delay_ms( 5000 );
}
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.NFCTag5
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.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.