PN532 and Data Logging Sheild
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 24
- Joined: Sun Apr 06, 2014 1:10 am
Re: PN532 and Data Logging Sheild
I have the SD card with SlotSelect on pin 10 - the default for the datalogging Shield, and am using pinD9 for the SlotSelect for the PN532 card (Breakout) the rest of the MISO, MOSI and CLK are common to both ...
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: PN532 and Data Logging Sheild
That sounds right. Let me check with the other engineers to see if there are any known compatibility issues between these boards or libraries.
-
- Posts: 24
- Joined: Sun Apr 06, 2014 1:10 am
Re: PN532 and Data Logging Sheild
Thanks for that, Bill.adafruit_support_bill wrote:That sounds right. Let me check with the other engineers to see if there are any known compatibility issues between these boards or libraries.
I have another SDcard/proto shield, which runs the software with no crashes, except that without the PN532 installed, I get a couple errors .... What this is telling me is that it is the PN532 which must be interfering with the bus lines when the following is loaded ....
#define SCK (13)
#define MISO (12)
#define MOSI (11)
#define SS (9)
Adafruit_PN532 nfc(SCK, MISO, MOSI, SS);
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: PN532 and Data Logging Sheild
we haven't tried them together, you should try PN532 on i2c (the shield is i2c by default!) instead, that will at least get rid of bus contension problems
-
- Posts: 24
- Joined: Sun Apr 06, 2014 1:10 am
Re: PN532 and Data Logging Sheild
This is the PN532 Breakout Board I am using .... How do you suggest I interface the SDA line to the Arduino ? It is a Bi-Directional data-line (Isn't it ? ) and will need to be level-shifted to match the 5V Arduino ... so should I tie SDA to pins 3&4 (for example) and tie pins 2&5 together to connect to SDA on the Arduino (these are the 4050 pins ...) then use another buffer in the 4050 for the SCL ?? I trust that IRQ can go direct to pin D2 (Arduino) ... ??adafruit2 wrote:we haven't tried them together, you should try PN532 on i2c (the shield is i2c by default!) instead, that will at least get rid of bus contention problems
Thanks for all your help ....
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: PN532 and Data Logging Sheild
Code: Select all
It is a Bi-Directional data-line (Isn't it ? ) and will need to be level-shifted to match the 5V Arduino
-
- Posts: 24
- Joined: Sun Apr 06, 2014 1:10 am
Re: PN532 and Data Logging Sheild
Does this mean I do not need a 4050 level-shift ? Just to use 1k (?) pull-ups to 3v3 for SCL and SDA ? ... and what about the reset ? ( i saw a refrence to resetting the PN532 board during setup in the library ...adafruit_support_bill wrote:As long as your i2c pullups are to 3.3v, there should be no problem. The Arduino will handle 3.3v logic signals.Code: Select all
It is a Bi-Directional data-line (Isn't it ? ) and will need to be level-shifted to match the 5V Arduino
Thanks
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: PN532 and Data Logging Sheild
The pullup resistor value is not especially critical. We use 10K on many of our i2c boards.
The reset line is a different story. Unlike the i2c bus, this signal is driven directly by the Arduino & you should use a level shifter.
The reset line is a different story. Unlike the i2c bus, this signal is driven directly by the Arduino & you should use a level shifter.
-
- Posts: 24
- Joined: Sun Apr 06, 2014 1:10 am
Re: PN532 and Data Logging Sheild
OK, Thanks - so ... is the I2C bus driven 'open collector' by the Arduino ?adafruit_support_bill wrote:The pullup resistor value is not especially critical. We use 10K on many of our i2c boards.
The reset line is a different story. Unlike the i2c bus, this signal is driven directly by the Arduino & you should use a level shifter.
Also - is the reset line into the PN532 the one labeled 'RSTOUT_N' on JP4 between IRQ and SCL ? ... seems a strange lable for an input line ;-)
-
- Posts: 24
- Joined: Sun Apr 06, 2014 1:10 am
Re: PN532 and Data Logging Sheild
Aaah ... found another issue ... on the datalogger shield, the I2C is already pulled-up to 5v for the rtc !! (with 2k2)
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: PN532 and Data Logging Sheild
RSTOUTN is and output - indicating that the device is in a reset state. The reset input is RSTPDN, and that appears to have a 10K pullup on it. Not If you drive that 'open collector' with the Arduino, you shouldn't need a level converter.
The pullups on the logger shield would be a problem though. You could remove them. As long as there is one set of pullups on the bus it will work.
The pullups on the logger shield would be a problem though. You could remove them. As long as there is one set of pullups on the bus it will work.
-
- Posts: 24
- Joined: Sun Apr 06, 2014 1:10 am
Re: PN532 and Data Logging Sheild
Ok, thanks. Will the RTC work if the I2C is pulled up to 3v3 ?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: PN532 and Data Logging Sheild
You could also use our I2C level-shifter
https://www.adafruit.com/product/757
The RTC should work with 3.3V pullups
https://www.adafruit.com/product/757
The RTC should work with 3.3V pullups
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: PN532 and Data Logging Sheild
The RTC should work with 3.3v pullups. But Rick has a good point. If you do use a level shifter, it should be an 'i2c friendly' one.
-
- Posts: 24
- Joined: Sun Apr 06, 2014 1:10 am
Re: PN532 and Data Logging Sheild
Thanks, Guys. I will try first with 3v3 pull-ups and report back. I will use a 4050 gate for the reset, though
Please be positive and constructive with your questions and comments.