Multiple SPI NFC Shields

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
tonyotis
 
Posts: 10
Joined: Tue Sep 10, 2013 9:11 pm

Multiple SPI NFC Shields

Post by tonyotis »

I've got four NFC shields configured to work with SPI. I can communicate to each one individually with the Adafruit SPI library no problem. Each shield has its own chip select line. It works fine when I comment out the other nfc declarations. As soon as I just uncomment declaring nfc1, it no longer can find nfc0, with the message "Didn't find P53x board".

Any insight here? I'm not even trying to do anything with nfc1 yet, but as soon as I declare it, nfc0 breaks. Code below:

Code: Select all

#include <Adafruit_PN532.h>

#define SCK  (13)
#define MOSI (11)
#define MISO (12)
#define SS0  (10)
#define SS1   (9)
#define SS2   (8)
#define SS3   (7)

Adafruit_PN532 nfc0(SCK, MISO, MOSI, SS0);
//Adafruit_PN532 nfc1(SCK, MISO, MOSI, SS1);
//Adafruit_PN532 nfc2(SCK, MISO, MOSI, SS2);
//Adafruit_PN532 nfc3(SCK, MISO, MOSI, SS3);

void setup(void) {
  Serial.begin(115200);
  Serial.println("Hello!");

  nfc0.begin();

  uint32_t versiondata = nfc0.getFirmwareVersion();
  if (! versiondata) {
    Serial.print("Didn't find PN53x board");
    while (1); // halt
  }
  
  // Got ok data, print it out!
  Serial.print("Found chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX); 
  Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC); 
  Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);
  
  // configure board to read RFID tags
  nfc0.SAMConfig();
  
  Serial.println("Waiting for an ISO14443A card");
}
Also, could I get a copy of the shield schematic? The schematic linked on the product page seems to be for the breakout board.

Thanks!
Last edited by tonyotis on Mon Jul 07, 2014 5:17 pm, edited 2 times in total.

tonyotis
 
Posts: 10
Joined: Tue Sep 10, 2013 9:11 pm

Re: Multiple SPI NFC Shields

Post by tonyotis »

Also, on a probably unrelated note, what is the difference between the 1.0 and 1.3 hardware? I noticed SEL0 and SEL1 were fixed, but anything else?

I've got one 1.0 board and three 1.3 boards, just want to make sure there isn't a possible issue there.

tonyotis
 
Posts: 10
Joined: Tue Sep 10, 2013 9:11 pm

Re: Multiple SPI NFC Shields

Post by tonyotis »

Was able to fix it by making SS go high after it was declared as an output. Still curious though about the board differences between 1.0 and 1.3 and if I could get a schematic for the shield.

Thanks!

User avatar
ktownsend
 
Posts: 1447
Joined: Thu Nov 05, 2009 2:18 am

Re: Multiple SPI NFC Shields

Post by ktownsend »

Other than the silk screen change you mentioned, the main difference was fixing an issue that caused higher than normal current draw on rev 1.0 boards ... the issue was fixed on version 1.3 to enable lower power consumption in sleep mode. We'd recommend the v1.3 boards where possible. Pin SVDD should only have a decoupling cap on it (which is the case in v1.3), and not be connected to VDD as was the case on v1.0 (the original boards were designed before NXP publicly released the full datasheets which were all under NDA, so the first versions were designed reverse engineering some existing products).

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

Return to “Arduino Shields from Adafruit”