I am trying to use the PN532 breakout board in I2C mode using a Sparkfun Redboard. The PN532 tutorial is not very detailed on these connections so I figured I'd ask my questions here:
1. As for SPI, I am using the level shifter for SDA, SCL and the IRQ pin. Is that correct?
2. Should the pullup resistors be put on the breakout side (i.e after the level shifter) or before (i.e on the Arduino side)? I have actually tried both and see no change.
The board works fine in SPI mode, I have set the jumpers correctly for I2C AFAIK and am using the correct nfc() object in the sketch (i.e the one for I2C with only two parameters). RESET pin is not connected (not even sure which one this is; is this RSTOUT_N?).
My logic analyzer shows that there is a byte sent to 0x48 but no device answers (NAK). Then another request comes on 0x49, again with a NAK. Then the readMifare sketch reports the board as not found. This is confirmed by running the I2C scanner code which does not find anything :
Code: Select all
I2CScanner ready!
starting scanning of I2C bus from 0 to 127...
addr: 0x0 addr: 0x1 addr: 0x2 addr: 0x3
addr: 0x4 addr: 0x5 addr: 0x6 addr: 0x7
addr: 0x8 addr: 0x9 addr: 0xA addr: 0xB
addr: 0xC addr: 0xD addr: 0xE addr: 0xF
addr: 0x10 addr: 0x11 addr: 0x12 addr: 0x13
addr: 0x14 addr: 0x15 addr: 0x16 addr: 0x17
addr: 0x18 addr: 0x19 addr: 0x1A addr: 0x1B
addr: 0x1C addr: 0x1D addr: 0x1E addr: 0x1F
addr: 0x20 addr: 0x21 addr: 0x22 addr: 0x23
addr: 0x24 addr: 0x25 addr: 0x26 addr: 0x27
addr: 0x28 addr: 0x29 addr: 0x2A addr: 0x2B
addr: 0x2C addr: 0x2D addr: 0x2E addr: 0x2F
addr: 0x30 addr: 0x31 addr: 0x32 addr: 0x33
addr: 0x34 addr: 0x35 addr: 0x36 addr: 0x37
addr: 0x38 addr: 0x39 addr: 0x3A addr: 0x3B
addr: 0x3C addr: 0x3D addr: 0x3E addr: 0x3F
addr: 0x40 addr: 0x41 addr: 0x42 addr: 0x43
addr: 0x44 addr: 0x45 addr: 0x46 addr: 0x47
addr: 0x48 addr: 0x49 addr: 0x4A addr: 0x4B
addr: 0x4C addr: 0x4D addr: 0x4E addr: 0x4F
addr: 0x50 addr: 0x51 addr: 0x52 addr: 0x53
addr: 0x54 addr: 0x55 addr: 0x56 addr: 0x57
addr: 0x58 addr: 0x59 addr: 0x5A addr: 0x5B
addr: 0x5C addr: 0x5D addr: 0x5E addr: 0x5F
addr: 0x60 addr: 0x61 addr: 0x62 addr: 0x63
addr: 0x64 addr: 0x65 addr: 0x66 addr: 0x67
addr: 0x68 addr: 0x69 addr: 0x6A addr: 0x6B
addr: 0x6C addr: 0x6D addr: 0x6E addr: 0x6F
addr: 0x70 addr: 0x71 addr: 0x72 addr: 0x73
addr: 0x74 addr: 0x75 addr: 0x76 addr: 0x77
addr: 0x78 addr: 0x79 addr: 0x7A addr: 0x7B
addr: 0x7C addr: 0x7D addr: 0x7E addr: 0x7F
done
Thanks !