PN532 RFID/NFC Shield

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
janban
 
Posts: 4
Joined: Thu Aug 23, 2012 5:25 am

PN532 RFID/NFC Shield

Post by janban »

I have setup PN532 RFID/NFC Shield and it works fine with MIFARE card which come with shield. I can read or write to it. Problem comes when i try to read or write to NFC mobile phone(Galaxy nexus in this case). It doesn't even detect it. Do i need to do any other configuration to do this ?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: PN532 RFID/NFC Shield

Post by adafruit »

The shield library does not support phone interfacing at this time. There is no ETA as to whether we will or when we will add support for it - its very complicated!

janban
 
Posts: 4
Joined: Thu Aug 23, 2012 5:25 am

Re: PN532 RFID/NFC Shield

Post by janban »

could you plz explain me how can i switch to SPI protocol(Currently I'm using I2c ). Same like NFC breakout board do i need to use a level shifter ?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: PN532 RFID/NFC Shield

Post by adafruit_support_rick »

You don't need level-shifting with the shield.

There are two solder jumpers on the shield, marked SEL0 and SEL1. You'll need to short both jumpers to select SPI mode.

You can't use the NFC I2C library - you'll need to download and use the SPI library, available here:
https://github.com/adafruit/Adafruit-PN532

laks
 
Posts: 11
Joined: Tue Nov 26, 2013 12:55 am

Re: PN532 RFID/NFC Shield

Post by laks »

The SPI library says SPI interface in pin nos 2,3,4 and 5
Is it correct?
I have adafruit NFC shiled V1.3
the SPI signals are brought to a 6 pin connector?
Is it connected to the arduino interface connectors?
Looks like this SPI signals are not connected?
Does this library works without any change in the code

https://github.com/adafruit/Adafruit-PN532

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: PN532 RFID/NFC Shield

Post by adafruit_support_rick »

You should use I2C with the shield, not SPI. Use the I2C library:
https://github.com/adafruit/Adafruit_NFCShield_I2C

User avatar
matthewbstokes
 
Posts: 5
Joined: Mon Feb 02, 2015 9:25 pm

Re: PN532 RFID/NFC Shield

Post by matthewbstokes »

So this tutorial outlines how you can convert the breakout board using SPI to use I2C. I'm wondering if there is anyway you can go in reverse? Is there a way I could remove components/scratch leads to connect the shield to a protoboard, and communicate over SPI? With the I2C library I am unable to communicate with an android device which is a severe limitation.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: PN532 RFID/NFC Shield

Post by adafruit_support_rick »

No need to cut any traces. Just close solder jumpers SEL0 and SEL1 to switch to SPI mode.

User avatar
aevitas
 
Posts: 1
Joined: Sat May 23, 2015 4:00 pm

Re: PN532 RFID/NFC Shield

Post by aevitas »

What do you mean by just closing the SEL0 and SEL1? Also, how can I then connect over SPI? Could you please explain it in more details, maybe even with a couple of pictures if possible.

Thank you very much.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: PN532 RFID/NFC Shield

Post by adafruit_support_rick »

The sheild really isn't designed to use SPI. Is there some reason you want to use SPI instead of I2C?

You close the solder jumpers by bridging them with a blob of solder.

You also have to solder jumper wires between SCK and pin4, MISO and pin 5, SS and pin 6, and MOSI and pin 7. The holes are adjacent to each other on the shield.

Define the SPI pins to match in your sketch:

Code: Select all

#define SCK  (4)
#define MOSI (7)
#define SS   (6)
#define MISO (5)

Adafruit_PN532 nfc(SCK, MISO, MOSI, SS);

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”