0

I have this Arduino Nano, Ethernet shield W5100 and RC522 as card reader. They are sharing pins D13, D12, D11, D10 is SS pin for W5100 D8 is SS pin for RC522. Problem is with pin D12, like it doesn't share it.

For example if I unplug D12 from W5100 RC522 reader works, if I wire it back it doesn't work anymore. W5100 works no matter if RC522 is wired or not, so problem would be somehow with pin D12.

Does anybody have some ideas, what I'm doing wrong right here?

1 Answer 1

3

I had almost exactly this situation with one of my projects.

The problem is that some Serial Peripheral Interface (SPI) devices don't properly put the MISO pin into high-impedance when SS is pulled high. I eventually resolved this by placing a tri-state buffer in the MISO line for each of the SPI devices.

I used a 74HC125 (4-channel tri-state buffer).

This is the page on Better SPI Bus Design in 3 steps that finally got me on the right track. I think the explanations are reasonably clear (at least compared with many other sites I found!).

6
  • Can you tell me little bit more, because I don't understand it very well. I'm kind a new into Arduino and IoT projects and also in electronic's part.
    – noname
    Commented Aug 28, 2017 at 9:05
  • @noname I'm just looking for the page the got me on the right direction. Bear with me for a few minutes ... Commented Aug 28, 2017 at 9:06
  • @noname I've added the link. Hope that helps you out. Commented Aug 28, 2017 at 9:12
  • Does this change contains also any hardware changes?
    – noname
    Commented Aug 28, 2017 at 9:19
  • @noname That depends on whether your RFID & Ethernet shield already have tri-state buffers on the MISO line. Mine didn't, so I had to add the 74HC125. Commented Aug 28, 2017 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.