Issue while accessing SD Card by 2 controllers

Hi,
I'm stuck again while trying to access the SD card module by MEGA and UNO one by one.
Here, MEGA will write into SD CARD & then UNO will read the data.
Initially, I tried it just by connecting the connections(CS, SCK, MOSI&MISO) directly to the pins of the card module.
But there, an issue had formed in between the SCK or MISO pins of both controllers(I'm not sure, which pin is making the issue).

  • Individually it is working fine.

Then I included a multiplexer as a switch in between two controller's out pins, to the card module.
At that time it works, but only for one controller. :confused: ...
to the
// I have tested the multiplexer IC (74HC157) by just giving 0s & 1s to the input pins. It was working well for every output.

Now, can you anyone guide me - where was my mistake?

  • How can I access the SD card by both controllers?

Do you mean that you have a single SD Card module and you wish to connect it to two separate Arduinos at the same time?

I suspect you will need to identify which signals interfere with each other and find a way to isolate them. In general the OUTPUT signals from the Arduinos are likely to interfere with each other.

Why not use one Arduino to send the data to the other one?

Better still, describe the project you are trying to create. Someone may have a better solution to your need.

...R