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.