Using 2 SPI devices on Arduino UNO

Hi
i am working on an audible guidance device using arduino UNO and 2 SPI devices :MFRC522(rf reader) and microSD card module(for playing saved audio).Im using an OLED too but its via I2C and its not causing my problem.
i ran into a problem and thats because of shared spi pins of these 2 modules and i surfed on the net and found some useful things but im still not getting my expected result.
I know about SS pin and connecting 2 slave device to arduino and i did it in my code by writing HIGH and LOW to CS pins of my modules but sdcard module MISO pin seems to not being released when its CS pin is HIGH.
so i surfed the net again and i found out that if i put a diode or 330ohm resistor between sdcard MISO and arduino it would solve the problem A BIT!
the problem is that i want to play audio through a headset(using 3.5mm audio jack …) but when im using resistor it plays a loud beep sound and not my voices and when i put a diode it only plays the voice once and then arduino needs to be restarted to play voices again.
so thats all the details please help and heres my code.THANK YOU

myprojec.ino (3.48 KB)

torinpa: sdcard module MISO pin seems to not being released when its CS pin is HIGH.

This is a common problem with many low-cost SD Card modules. They include a buffer/driver chip to do the level shifting from 5V signals to 3.3V signals but they don't tri-state (turn off) the MISO driver when SS is HIGH. One possibility for a work-around is to bypass the MISO buffer/driver and connect the Arduino's MISO pin directly to the MISO signal from the SD card. I've had good luck using 3.3V signals directly on 5V inputs. Ideally, a different SD Card module that has a tri-state buffer/driver chip can be used.

johnwasser: This is a common problem with many low-cost SD Card modules.

thank you very much,i didnt know about this. what do you think of a SD data logger,can i use it to play audio and not having problem with MISO pin? and one last question,can i use a tri-state buffer IC(like 74126)for both modules to do the High Impedance externally?

torinpa: What do you think of a SD Data Logger. Can i use it to play audio and not have a problem with MISO pin?

That would depend on the SD Data Logger. Unfortunately, most vendors don't include a schematic to show if their design is done right or not.

torinpa: And one last question: can i use a tri-state buffer IC (like 74126) for both modules to do the High Impedance externally?

The 74126 has an Active High enable. You want a tristate buffer with an Active Low enable. Or you could put an inverter between the Slave Select line and the buffer enable.

johnwasser: That would depend on the SD Data Logger.

Thank you very much John,I bought a SD Card data logger(Deek-Robot)and it didn't make any problem(it had a 74125 tri-state buffer as you said before) like my former SD card module did.