SD card socket with LCD - wiring

Hello,

I have a trouble with wiring the SD card socket to my Arduino Mega 2560.

On socket I've 4 pins: CS, MOSI, MISO, SCK. I've found some tutorials but, wiring didn't work :frowning:
I've tryied wire it like this:
MOSI - pin 11
MISO - pin 12
CLK - pin 13
CS - pin 4
But It didn't work :/.

The LCD is working with connection:
LED: +5V
SCK: 52
SDA: 51
A0: 9 (PWM)
Reset: 8 (PWM)
CS: 53
GND: GND
VCC: +5V

Does anyone how to wire it, please? And second question is: Is possible to read .txt file from SD card an show it on LCD (TFT) display?

Thank you for replies!
//PS: Sorry for my English. If you see some big mistakes, please tell me.

Hello,

I've try to connect the SD card socket like this:
cs -- 53
mosi -- 51
sck -- 52
miso -- 50

...and it works! :smiley:

But, the LCD is using same pins (51,52,53). Is there any way to connect the LCD to other pins?

Is the LCD also a spi interface ?

If it is, the signal lines ( clock, miso, mosi ) connect to the same arduino pins 51,52,53 on a mega

You have two "chip select" outputs from the arduino, one to each device, which are normally kept high. When you want to communicate to the device, you set one or the other CS line to low, and that device will respond to the Spi.