Slave SPI does not work I am trying to use both an SRAM (23LC1024) and SD card reader on an SPI bus.

My connections (for SPI):


Arduino pin 11 (MOSI) -> SRAM pin 5 (SI/SIO0)
Arduino pin 12 (MISO) -> SRAM pin 2 (SO/SIO1)
Arduino pin 13 (SCK ) -> SRAM pin 6 (SCK)
Arduino pin 10        -> SRAM pin 1 (CS )


In this way, I can read data from the SRAM.

To connect the SD I connected:


SRAM pin 2 (SO/SIO1) -> SD MISO 
SRAM pin 5 (SI/SIO0) -> SD MOSI
SRAM pin 6 (SCK    ) -> SD SCK
Arduino pin 9        -> SD CS


Currently the SD card works, but read-byte commands to the SRAM always gives the same (wrong) value.

If I remove the wire between SRAM pin 2 and SD MISO the SRAM gives correct values, but the SD card does not have a MISO connection and seems to always return the same data (but still functions).

I also tried to first make the connections from the Arduino to the SD and than to the SRAM (but same result, not working).

What am I doing wrong?

Update: The problem is solved, however I do not understand why. I reconnected all pins, removed the shield to access the SRAM directly which worked. Than I put the shield back on (and moving the pins back) ... maybe it was something stupid that one pin did not have good contact. I'm sorry for the inconvenience.

New question (related):

Now it works with the Data logger shield, but not with the (cheap) SD reader breakout cards. 

However, my eventual solution needs more proto space than is available on the Data logger shield.... do I really need to use a complete shield (and later the Arduino Mega), and a Mega proto shield ... that will be a big box.
While for the data logger, I don't need the RTC neither.
It doesn't sound like you are doing anything wrong as such, it all sounds fine.

However SD cards, certainly some cheap ones, don't like to play nicely with other devices on a shared bus. Also some SD card adapters with level shifting don't play nicely.

By not playing nicely I mean tri-stating the MISO line in a timely fashion (or at all in some cases) which stops any data getting out of other devices, and can even cause damage in some cases.

You should check out the level shifting on the SD card adapter to see if it has tri-stating control of MISO (if it is shifting that line, not all do), try other brands of SD cards, and maybe add your own tri-state buffer to the SD card signals.