Carte à clic NFC 2
Carte à clic NFC 2
La NFC 2 Click Board™ est une carte complémentaire compacte qui contient un émetteur-récepteur NFC hautement intégré pour la communication sans contact. Cette carte est équipée du PN7150, la meilleure solution NFC complète plug&play hautes performances avec micrologiciel intégré et interface NCI conçue pour la communication sans contact à 13,56 MHz de NXP USA Inc. Cet émetteur-récepteur configurable I2C utilise un concept de modulation et de démodulation exceptionnel entièrement intégré pour différents types de méthodes et de protocoles de communication sans contact. Il peut fonctionner à la fois en mode lecteur et en mode carte. Cette Click Board™ est la solution idéale pour intégrer rapidement la technologie NFC dans n'importe quelle application.
La carte NFC 2 Click Board™ est prise en charge par une bibliothèque compatible mikroSDK, qui comprend des fonctions qui simplifient le développement logiciel. Cette carte Click Board™ est un produit entièrement testé, prêt à être utilisé sur un système équipé du socket mikroBUS™.
REMARQUE : Outre le format de la carte Click, Mikroe propose une version Dongle également basée sur l'émetteur-récepteur PN7150 de NXP.
How Does The NFC 2 Click Board™ Work?
The NFC 2 Click Board™ is based on the PN7150, high-performance full NFC solution with integrated firmware and I2C interface designed for contactless communication at 13.56 MHz from NXP USA Inc. This board has full compliance with NFC Forum specification that means that you will be able to use the full potential of NFC. It is the ideal solution for rapidly integrating NFC technology in any application, especially those running O/S environments like Linux and Android, reducing size and cost thanks to embedded NFC firmware providing all NFC protocols as a pre-integrated feature and ultra-low power consumption.
The PN7150 embeds a microcontroller core ARM Cortex-M0 loaded with the integrated firmware and provides an easy integration and validation cycle as all the NFC real-time constraints, protocols, and device discovery are being taken care of internally. The host can configure the PN7150 to notify for a card or peer detection and start communicating with them. The core microcontroller chip of the PN7150 can run without any external clock (based on an internal oscillator). However, the 13.56MHz RF field carrier accuracy requirements are not compatible with the use of an internal oscillator. That's why the PN7150 has an external crystal oscillator connected to its XTAL pins.
It also has four power states: Monitor, Hard Power Down (HPD), Standby, and Active. At the application level, the PN7150 will continuously switch between different power states to optimize the current consumption. The PN7150 is designed to allow the host controller to have full control over its operation, thus of the power consumption of the PN7150 based NFC solution and the possibility to restrict parts of the PN7150 functionality. More information about these modes user can find in the attached datasheet.
The NFC 2 Click Board™ communicates with MCU using the standard I2C 2-Wire interface with a clock frequency up to 100kHz in the Standard, up to 400kHz in the Fast, and up to 3.4MHz in the High-Speed Mode. The PN7150 also allows the choice of the least significant bit (LSB) of its I2C slave address by positioning SMD jumpers labelled as ADDR SEL to an appropriate position marked as 0 and 1. To enable and ensure data flow control between PN7150 and host controller, additionally, a dedicated interrupt line labelled as INT is provided that Active state is programmable. It also contains Reset function, and the RF antenna which is used to communicate over RF with a Tag (Card) and a Reader/Writer or a Peer device.
The NFC 2 Click Board™ is designed to be operated only with a 3.3V logic voltage level, while 5V is used as transmitter input supply voltage of PN7150. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with different logic levels. However, the Click board™ comes equipped with a library that contains easy to use functions and an example code which can be used, as a reference, for further development.
SPECIFICATIONS
Type | RFID/NFC |
Applications | Can be used for rapidly integrating NFC technology in any application. |
On-board modules | The NFC 2 Click Board™ is based on the PN7150, high-performance full NFC solution with integrated firmware and I2C interface designed for contactless communication at 13.56 MHz from NXP USA Inc. |
Key Features | Ultralow power consumption, automatic wake-up via RF field, integrated non-volatile memory to store data and executable code for customization, various RF protocols supported, includes ARM Cortex-M0 microcontroller core, and more. |
Interface | I2C |
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 of the NFC 2 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
Reset | RST | 2 | RST | INT | 15 | INT | Interrupt |
NC | 3 | CS | RX | 14 | NC | ||
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | 5V | Power Supply |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
JP1-JP2 | ADDR SEL | Left | I2C Address Selection: Left position 0, Right position 1 |
NFC 2 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | -0.3 | 3.3 | 4.35 | V |
Operating Frequency | - | 13.56 | 52 | MHz |
Maximum RF Driver Current | - | - | 180 | mA |
Maximum Output Power | - | - | 0.85 | W |
Operating Temperature Range | -30 | +25 | +85 | °C |
Software Support
We provide a library for the NFC 2 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions to control the NFC 2 Click Board™. A library performs the communication with the device via I2C interface.
Key Functions
void nfc2_generic_write ( uint8_t *p_tx_data, uint8_t n_bytes )
- Generic write function.void nfc2_generic_read ( uint8_t *p_rx_h_data, uint8_t *p_rx_p_data )
- Generic read function.void nfc2_cmd_core_reset ( void )
- Core reset command function.
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C and start to write log.
- Application Initialization - Initialization driver enables - I2C, hw reset, reseteting and initialize core, disabling standby mode, starting test procedure, set configuration and start discovery, also write log.
- Application Task - (code snippet) This is an example which demonstrates the usage of the NFC 2 Click Board™. The NFC 2 Click Board™ can be used for detection of RFiD tag and displays it's value via USART terminal. All data logs write on USB UART changes for every 1 sec.
void application_task ( ) { while ( nfc2_check_irq( ) == NFC2_IQR_STATE_HIGH ) { nfc2_read_ctrl_packet_data( &ctrl_pck_data ); Delay_ms( 100 ); nfc2_activate_rmt_mifare_card( ); Delay_ms( 100 ); nfc2_read_ctrl_packet_data( &ctrl_pck_data ); Delay_ms( 10 ); while ( nfc2_check_irq( ) == NFC2_IQR_STATE_LOW ); nfc2_read_ctrl_packet_data( &ctrl_pck_data ); nfc2_cmd_authenticate_sector( 0x30 ); Delay_ms( 100 ); nfc2_read_ctrl_packet_data( &ctrl_pck_data ); Delay_ms( 10 ); while ( nfc2_check_irq( ) == NFC2_IQR_STATE_LOW ); nfc2_read_ctrl_packet_data( &ctrl_pck_data ); display_nfc_data( ); mikrobus_logWrite( " Disconnect Card ", _LOG_LINE ); nfc2_cmd_card_disconnected( ); Delay_ms( 10 ); nfc2_read_ctrl_packet_data( &ctrl_pck_data ); Delay_ms( 10 ); while ( nfc2_check_irq( ) == NFC2_IQR_STATE_LOW ); nfc2_read_ctrl_packet_data( &ctrl_pck_data ); Delay_ms( 100 ); } while ( nfc2_check_irq( ) == NFC2_IQR_STATE_LOW ); mikrobus_logWrite( "-----------------------", _LOG_LINE ); Delay_ms( 1000 ); }
Additional Functions :
void display_packet ( )
- Display packet log data.void display_nfc_data ( )
- Display packet log data.void nfc2_test_antenna ( )
- Testing Antenna function.void nfc2_reset_and_init_core ( )
- Reset and init core function.
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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.
MIKROSDK
The NFC 2 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.
Software Support
We provide a library for the NFC 2 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions to control the NFC 2 Click Board™. A library performs the communication with the device via I2C interface.
Key Functions
void nfc2_generic_write ( uint8_t *p_tx_data, uint8_t n_bytes )
- Generic write function.void nfc2_generic_read ( uint8_t *p_rx_h_data, uint8_t *p_rx_p_data )
- Generic read function.void nfc2_cmd_core_reset ( void )
- Core reset command function.
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C and start to write log.
- Application Initialization - Initialization driver enables - I2C, hw reset, reseteting and initialize core, disabling standby mode, starting test procedure, set configuration and start discovery, also write log.
- Application Task - (code snippet) This is an example which demonstrates the usage of the NFC 2 Click Board™. The NFC 2 Click Board™ can be used for detection of RFiD tag and displays it's value via USART terminal. All data logs write on USB UART changes for every 1 sec.
void application_task ( ) { while ( nfc2_check_irq( ) == NFC2_IQR_STATE_HIGH ) { nfc2_read_ctrl_packet_data( &ctrl_pck_data ); Delay_ms( 100 ); nfc2_activate_rmt_mifare_card( ); Delay_ms( 100 ); nfc2_read_ctrl_packet_data( &ctrl_pck_data ); Delay_ms( 10 ); while ( nfc2_check_irq( ) == NFC2_IQR_STATE_LOW ); nfc2_read_ctrl_packet_data( &ctrl_pck_data ); nfc2_cmd_authenticate_sector( 0x30 ); Delay_ms( 100 ); nfc2_read_ctrl_packet_data( &ctrl_pck_data ); Delay_ms( 10 ); while ( nfc2_check_irq( ) == NFC2_IQR_STATE_LOW ); nfc2_read_ctrl_packet_data( &ctrl_pck_data ); display_nfc_data( ); mikrobus_logWrite( " Disconnect Card ", _LOG_LINE ); nfc2_cmd_card_disconnected( ); Delay_ms( 10 ); nfc2_read_ctrl_packet_data( &ctrl_pck_data ); Delay_ms( 10 ); while ( nfc2_check_irq( ) == NFC2_IQR_STATE_LOW ); nfc2_read_ctrl_packet_data( &ctrl_pck_data ); Delay_ms( 100 ); } while ( nfc2_check_irq( ) == NFC2_IQR_STATE_LOW ); mikrobus_logWrite( "-----------------------", _LOG_LINE ); Delay_ms( 1000 ); }
Additional Functions :
void display_packet ( )
- Display packet log data.void display_nfc_data ( )
- Display packet log data.void nfc2_test_antenna ( )
- Testing Antenna function.void nfc2_reset_and_init_core ( )
- Reset and init core function.
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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.
MIKROSDK
The NFC 2 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.
Carte à clic NFC 2
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.