Connect NFC Shield to Arduino Mega 2560 (but not stack)

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

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
adafruit_support_bill
 
Posts: 88086
Joined: Sat Feb 07, 2009 10:11 am

Re: Connect NFC Shield to Arduino Mega 2560 (but not stack)

Post by adafruit_support_bill »

My fault - I forgot to mention that you needed digital pin 2 also for the interrupt.

zinedine
 
Posts: 13
Joined: Sat Mar 16, 2013 12:38 pm

Re: Connect NFC Shield to Arduino Mega 2560 (but not stack)

Post by zinedine »

Thanks! It works now !

zinedine
 
Posts: 13
Joined: Sat Mar 16, 2013 12:38 pm

Re: Connect NFC Shield to Arduino Mega 2560 (but not stack)

Post by zinedine »

Dear Adafruit team,

since my last post, I bougth a BLE Shield from Redbear and it has to use SPI. (GND, 5V, D15, D16, D50 MISO, D51 MOSI and D52 SCK).

Till yet I wire my NFC Shild last you told me:

Arduino 5V -> NFC Shield 5V
Arduino GND -> NFC Shield GND
Arduino D20 SDA -> NFC Shield SDA
Arduino D21 SCL -> NFC Shield SCL
Arduino D2 -> NFC Shield 2

But I need to use I2C yet, I read that instead of SDA/SCL I need to use A4 und A5.

Do I need other pinsm or change my call to the Adafruit library? ( Adafruit_NFCShield_I2C nfcShield(2, 3); ).


thank you for your help :)

User avatar
adafruit_support_bill
 
Posts: 88086
Joined: Sat Feb 07, 2009 10:11 am

Re: Connect NFC Shield to Arduino Mega 2560 (but not stack)

Post by adafruit_support_bill »

But I need to use I2C yet, I read that instead of SDA/SCL I need to use A4 und A5.
No. That is incorrect advice. A4 and A5 are SDA and SCL on Atmega328-based Arduinos only.

On your Mega 2560, digital 20 is SDA and 21 is SCL. For Rev3 and later Arduinos of all types, SDA and SCL are also available on two dedicated pins next to the AREF pin.

zinedine
 
Posts: 13
Joined: Sat Mar 16, 2013 12:38 pm

Re: Connect NFC Shield to Arduino Mega 2560 (but not stack)

Post by zinedine »

thanks for your quick reply!

ok, I understand. I thought I was using SPI. I read somewhere than one of the SDA or SLC is also MOSI…

So I need to find somewhere else, why no devices find my BLE shield if I call nfc.begin(). When I uncomment it, I can find und connect to the BLE shield.

Thank you!

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

Return to “Arduino Shields from Adafruit”