- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
I'm new to programming RFID modules, and I'm currently working with the PN7160 module. I've been searching for information on how to communicate with this module via I2C, but I've found very little documentation and examples for Arduino or other microcontrollers.
My question is whether anyone knows of a specific library that is compatible with the PN7160 module and facilitates communication via I2C. If anyone has previous experience with this module or can provide some guidance on how to approach I2C communication with it, it would be greatly appreciated.
Additionally, I wonder if it's possible to use a library designed for the PN532 module instead of one specifically for the PN7160 since I've seen more resources available for the PN532. Has anyone tried this before?
I appreciate any advice, information, or resources you can provide. Thank you very much for your time and assistance!
Best regards, Lucas López.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I hope you are all doing well. I've been working on adapting the MCUExpresso system to my Microchip Studio project, and for the most part, things are going smoothly. However, I've reached a point where I'm encountering quite a few errors.
My main objective is to implement Mifare card reading using the I2C communication system I've set up. Unfortunately, I've been facing some challenges at this stage.
I plan to attach the code I'm currently using to provide more context. If anyone could offer me some assistance or guidance in this case, I would greatly appreciate it.
Thank you in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I am working on a PN7160 library for arduino and in the configuration part, specifically when I send the NxpNci_RF_CONF array, the chip response is as follows:
NCI >> 20 02 4C 09
A0 0D 03 78 0D 02
A0 0D 03 78 14 02
A0 0D 06 4C 44 65 09 00 00
A0 0D 06 4C 2D 05 35 1E 01
A0 0D 06 82 4A 55 07 00 07
A0 0D 06 44 44 03 04 C4 00
A0 0D 06 46 30 50 00 18 00
A0 0D 06 48 30 50 00 18 00
A0 0D 06 4A 30 50 00 08 00
NCI << 40 02 01 05
and I understand that it indicates a configuration error. I have taken the byte sequence from the examples provided by NXP for LPC82x example and the module I am using is the one in the image attached to a raspberry pico with arduino skecth for testing. Can I use some default byte sequence and how can I get it? I tried to send only a few commands but the response was the same. Firmware in PN7160 is 12.50.09
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi lucas
you reach to solution in arduino
i face same problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, good evening.
I hope you are all doing well. I've been diligently working on adapting the MCUExpresso system to my Microchip Studio project, and for the most part, things are going smoothly. However, I've encountered a particular issue that's been causing some headaches.
The problem centers around the #include "Nfc.h" directive within the Portable\RFID\NciNxp20.c file. It seems that this inclusion is triggering a cascade of errors that I can't seem to resolve.
Moreover, I've noticed that I'm getting a couple of linkage errors that are puzzling me. From what I can tell, the source files and libraries are correctly configured, so these errors shouldn't be occurring.
I plan to attach the relevant portions of the code I'm currently using to provide more context and hopefully identify the root of the issue. If anyone could offer me some assistance or guidance in this case, I would greatly appreciate it.
Thank you in advance for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Lucas,
Hope you are doing well. You could check the NXP-NCI2.0 MCUXpresso examples guide.
There you can find the available MCUXpresso examples with different microcontrollers, and the NFC functionalities for these demos.
Hope this helps!
Regards,
Ricardo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I hope you are all doing well. I've been working on adapting the MCUExpresso system to my Microchip Studio project, and for the most part, things are going smoothly. However, I've reached a point where I'm encountering quite a few errors.
My main objective is to implement Mifare card reading using the I2C communication system I've set up. Unfortunately, I've been facing some challenges at this stage.
I plan to attach the code I'm currently using to provide more context. If anyone could offer me some assistance or guidance in this case, I would greatly appreciate it.
Thank you in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Porting to third party MCU is out of the scope of our technical support.
But, you could check this documentation, that might be helpful:
Regards,
Ricardo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Based on the information provided, there doesn't seem to be a specific Arduino library for the PN7160 module. However, you can still communicate with the module via I2C by writing your own functions, as demonstrated in the code snippet you provided.
As for using a library designed for the PN532 module, it's important to note that while both modules are NFC controllers, they may have different register maps and command sets. Therefore, a library designed for the PN532 might not work correctly with the PN7160. It's recommended to refer to the PN7160's data sheet and application notes for detailed information on how to interface with the device.
Here is a simple example of how you might write to the PN7160 using I2C:
void write_to_pn7160(unsigned char *buffer_write, unsigned char num_bytes){ unsigned char buffer_write_nfc [9] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; // Your code here to write to the PN7160 }
Remember to replace '// Your code here to write to the PN7160' with the actual I2C write function for your microcontroller.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here are the configuration values I plan to apply:
0x20, 0x02, 0x94, 0x11,
0xA0, 0x0D, 0x06, 0x04, 0x35, 0x90, 0x01, 0xF4, 0x01, /* RF_CLIF_CFG_INITIATOR CLIF_AGC_INPUT_REG */
0xA0, 0x0D, 0x06, 0x06, 0x30, 0x01, 0x90, 0x03, 0x00, /* RF_CLIF_CFG_TARGET CLIF_SIGPRO_ADCBCM_THRESHOLD_REG */
0xA0, 0x0D, 0x06, 0x06, 0x42, 0x02, 0x00, 0xFF, 0xFF, /* RF_CLIF_CFG_TARGET CLIF_ANA_TX_AMPLITUDE_REG */
0xA0, 0x0D, 0x06, 0x20, 0x42, 0x88, 0x00, 0xFF, 0xFF, /* RF_CLIF_CFG_TECHNO_I_TX15693 CLIF_ANA_TX_AMPLITUDE_REG */
0xA0, 0x0D, 0x04, 0x22, 0x44, 0x23, 0x00, /* RF_CLIF_CFG_TECHNO_I_RX15693 CLIF_ANA_RX_REG */
0xA0, 0x0D, 0x06, 0x22, 0x2D, 0x50, 0x34, 0x0C, 0x00, /* RF_CLIF_CFG_TECHNO_I_RX15693 CLIF_SIGPRO_RM_CONFIG1_REG */
0xA0, 0x0D, 0x06, 0x32, 0x42, 0xF8, 0x00, 0xFF, 0xFF, /* RF_CLIF_CFG_BR_106_I_TXA CLIF_ANA_TX_AMPLITUDE_REG */
0xA0, 0x0D, 0x06, 0x34, 0x2D, 0x24, 0x37, 0x0C, 0x00, /* RF_CLIF_CFG_BR_106_I_RXA_P CLIF_SIGPRO_RM_CONFIG1_REG */
0xA0, 0x0D, 0x06, 0x34, 0x33, 0x86, 0x80, 0x00, 0x70, /* RF_CLIF_CFG_BR_106_I_RXA_P CLIF_AGC_CONFIG0_REG */
0xA0, 0x0D, 0x04, 0x34, 0x44, 0x22, 0x00, /* RF_CLIF_CFG_BR_106_I_RXA_P CLIF_ANA_RX_REG */
0xA0, 0x0D, 0x06, 0x42, 0x2D, 0x15, 0x45, 0x0D, 0x00, /* RF_CLIF_CFG_BR_848_I_RXA CLIF_SIGPRO_RM_CONFIG1_REG */
0xA0, 0x0D, 0x04, 0x46, 0x44, 0x22, 0x00, /* RF_CLIF_CFG_BR_106_I_RXB CLIF_ANA_RX_REG */
0xA0, 0x0D, 0x06, 0x46, 0x2D, 0x05, 0x59, 0x0E, 0x00, /* RF_CLIF_CFG_BR_106_I_RXB CLIF_SIGPRO_RM_CONFIG1_REG */
0xA0, 0x0D, 0x06, 0x44, 0x42, 0x88, 0x00, 0xFF, 0xFF, /* RF_CLIF_CFG_BR_106_I_TXB CLIF_ANA_TX_AMPLITUDE_REG */
0xA0, 0x0D, 0x06, 0x56, 0x2D, 0x05, 0x9F, 0x0C, 0x00, /* RF_CLIF_CFG_BR_212_I_RXF_P CLIF_SIGPRO_RM_CONFIG1_REG */
0xA0, 0x0D, 0x06, 0x54, 0x42, 0x88, 0x00, 0xFF, 0xFF, /* RF_CLIF_CFG_BR_212_I_TXF CLIF_ANA_TX_AMPLITUDE_REG */
0xA0, 0x0D, 0x06, 0x0A, 0x33, 0x80, 0x86, 0x00, 0x70 /* RF_CLIF_CFG_I_ACTIVE CLIF_AGC_CONFIG0_REG */
My goal is to detect reading MIFARE cards and perform read-only operations on specific blocks of the card. Does anyone here have experience with configuring the PN7160 for MIFARE cards or can provide guidance on how to proceed after applying this configuration?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I realized that I forgot to mention the XTAL configuration in my previous message. This configuration is important for the proper operation of the PN7160. Here are the XTAL configuration values that I plan to apply:
0x20, 0x02, 0x05, 0x01, /* CORE_SET_CONFIG_CMD */
0xA0, 0x03, 0x01, 0x08 /* CLOCK_SEL_CFG */
These configuration values are used to configure the clock source (XTAL) of the PN7160, which directly affects its performance.