NFC Shield + Arduino Nano
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

NFC Shield + Arduino Nano

by zenzizenzizenzic on Sat Feb 16, 2013 12:22 pm

Hi all,
I've got the I2C NFC Shield and am trying to get it up and running with the Arduino Nano (ATMega328). I am reasonably confident in my solder joints and have power in the NFC Shield. The busy light comes on and stays on the moment power arrives - is this supposed to happen?
Running the readmifare example I get
Hello!
Didn't find PN53x board

I have 5V, GND, SDA, SCL and D2 connected to their counterparts on the Nano. Is the IRQ (#define IRQ (2)) the pin on the ATMega328 or is there some magic remapping the number there from D2 to pin 5? (I think it should be 5 as that's the pin D2 maps to on the Nano.)
Any ideas?
zenzizenzizenzic
 
Posts: 5
Joined: Sat Feb 16, 2013 12:11 pm

Re: NFC Shield + Arduino Nano

by adafruit_support_bill on Sat Feb 16, 2013 12:29 pm

D2 is digital pin 2 on the Arduino. Here are the schematics for reference: https://github.com/adafruit/Adafruit-PN ... NFC-Shield

adafruit_support_bill
 
Posts: 40139
Joined: Sat Feb 07, 2009 10:11 am

Re: NFC Shield + Arduino Nano

by zenzizenzizenzic on Sat Feb 16, 2013 1:14 pm

OK that's what I thought - I'm coming from the Fez line of microcontrollers where everything was based on microcontroller pin not the number of the digital/analog i/o.
I've attached my solder joints just in case I've done something foolish :P

204.gif
204.gif (492.12 KiB) Viewed 1551 times

206.gif
206.gif (505.31 KiB) Viewed 1551 times
zenzizenzizenzic
 
Posts: 5
Joined: Sat Feb 16, 2013 12:11 pm

Re: NFC Shield + Arduino Nano

by adafruit_support_bill on Sat Feb 16, 2013 1:25 pm

The solder looks good. Both power and busy lights should illuminate on power up. Where do you have SDA and SCL connected? It doesn't show in the photos.

adafruit_support_bill
 
Posts: 40139
Joined: Sat Feb 07, 2009 10:11 am

Re: NFC Shield + Arduino Nano

by zenzizenzizenzic on Sat Feb 16, 2013 1:29 pm

D2(Shield) to D2(Nano)
SDA(Shield) to D4(Nano)
SCL(Shield) to D5(Nano)
GND(Shield - the one next to 5V) to GND(Nano - the one next to VIN)
5V(Shield) to 5V(Nano) - Power supplied through USB
zenzizenzizenzic
 
Posts: 5
Joined: Sat Feb 16, 2013 12:11 pm

Re: NFC Shield + Arduino Nano

by adafruit_support_bill on Sat Feb 16, 2013 1:32 pm

SDA(Shield) to D4(Nano)
SCL(Shield) to D5(Nano)


Should be
SDA(Shield) to A4(Nano)
SCL(Shield) to A5(Nano)

adafruit_support_bill
 
Posts: 40139
Joined: Sat Feb 07, 2009 10:11 am

Re: NFC Shield + Arduino Nano

by zenzizenzizenzic on Sat Feb 16, 2013 1:45 pm

Wow. OK - for those wondering the same thing I was, the diagram that comes up most often when you search for "Nano pinout" is wrong: http://2.bp.blogspot.com/-_M5HsO7r1dM/U ... pinout.png
Trust the pinouts (even unofficial) you can find on the arduino forums: http://arduino.cc/forum/index.php?topic=147579.0

Thanks for the help! She works perfectly now!
zenzizenzizenzic
 
Posts: 5
Joined: Sat Feb 16, 2013 12:11 pm

Re: NFC Shield + Arduino Nano

by adafruit_support_bill on Sat Feb 16, 2013 2:22 pm

The Arduino product pages are my usual reference. http://arduino.cc/en/Main/ArduinoBoardNano
It is not as convenient as a pinout diagram, but they are consistently correct. :D

adafruit_support_bill
 
Posts: 40139
Joined: Sat Feb 07, 2009 10:11 am

Re: NFC Shield + Arduino Nano

by zenzizenzizenzic on Sat Feb 16, 2013 3:10 pm

I read that page at least a dozen times and missed the segue into analog every time :roll: :P
zenzizenzizenzic
 
Posts: 5
Joined: Sat Feb 16, 2013 12:11 pm

Please be positive and constructive with your questions and comments.