Good day all,

I am trying to connect a range of RC522 RFID modules to an IO expander MCP23S17 run by a RPI. I am having trouble finding information regarding editing the MFRC522.py modules to allow a change of CS pin. Has anyone attempted or know of reading materials that can point me in the right direction?


To clarify: I am looking for information regarding switching between RC522 modules one at a time connected to IO expander MCP23S17. So will be calling a IO pin from MCP23S17 as a designated CS pin for the RC522 module and reading a RFID tag on a selected RFID reader. The way of which I can do this, I require some insights. Many thanks

  • 2
    Not really a Pi question. It's more of how do I change/write a program type of question.
    – joan
    Jun 1, 2021 at 15:03
  • 1
    Did I assume wrong this was a "Q&A for users and developers of hardware and software for Raspberry Pi"?
    – J01010
    Jun 2, 2021 at 1:20
  • 1
    @j01010, Welcome and nice to meet you. (1) Rpi is OK to use pimylifeup/MFRC522-python for RFID apps. (2) MCP23S17 GPIO pins to reset/chip select RC-522 looks like a good design approach. (3) You might like to search RpiSE, SO and EESE for my answers to RFID/NFC questions.
    – tlfong01
    Jun 2, 2021 at 2:14
  • You might like to skim my old answers on various questions on NFC and RFID. You might find references on them useful for your projects: (1) Raspberry Pi , RFID , Relay Module and Magnetic Door - RpiSE raspberrypi.stackexchange.com/questions/124290/… (2) Can RFID read stacked cards? - EESE electronics.stackexchange.com/questions/519993/… (3) How can Rpi read a PN532 NFC Module? - SO stackoverflow.com/questions/61165652/…
    – tlfong01
    Jun 2, 2021 at 2:30
  • For 017 and s17, you might like to skim my some 200+ (yes, 200+! :)) answers in Rpi.org.forum: Search found 178 + 27 matches: mcp23017 tlfong01, mcp23s17 tlfong01 (4) raspberrypi.org/forums/search.php?keywords=mcp23s17+tlfong01 (5) raspberrypi.org/forums/search.php?keywords=mcp23017+tlfong01. As you know, 017 and s17 have the same internal architecture, except interface SPI and I2C, so many tricks are common. Cheers.
    – tlfong01
    Jun 2, 2021 at 2:35


Your Answer

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

Browse other questions tagged or ask your own question.