How can I work with two devices that use the SPI protocol? I'm working with a project in which I need to use an SD card module and an RFID antenna simultaneously. The devices that I'm using are the MFRC522 and the CATALEX SD Card Adapter. Both have SPI Protocol, and they're using the libraries MFRC522.h and SD.h.

This is the pin layout that I'm using:

/////// For RFID //////////
             Arduino   
             Mega      
  Signal     Pin       
  ---------------------
  RST/Reset  5         
  SPI SS     53 (CUSTOM)
  SPI MOSI   51        
  SPI MISO   50        
  SPI SCK    52        


//////// For SD ///////////
             Arduino   
             Mega      
  Signal     Pin       
  ----------------------
  SPI SS     49 (CUSTOM)       
  SPI MOSI   51       
  SPI MISO   50        
  SPI SCK    52   


As you can see the only line that they are not sharing is the Slave Select (aside from the RST pin of the RC522 module), so I believe that my wiring is correct.
I tried setting in LOW the chip select of the device that I wanted to use and in HIGH the one that I didn't. But this didn't work.

Any help you could provide would be appreciated! Thanks!
If that SD card adapter looks similar like the picture, I never could get it to work together with another SPI device.

What I used was a data logger shield for Arduino (with SD card slot and proto part, unused in my case), something like this: SD logger