Mega+tftshield + tft SD failure.

Hello all.

First of all, I'm new to the forum and also with Arduino.

For my project I need to get this Arduino to show pictures from sd card.

My hardware setting are currently

Arduino mega 2560 from Robotale
TFT_320QVT
TFT LCD Mega Shield v2.2
I have 2 sd cards. Elite pro 8gb i ordered with mega and old kingston 1gb

I got the lcd screen working just by plugging it over shield and using Henning's UTFT library demo 320x240. I could also draw pixels etc so tft is fine.

Formated the sd cards with SDformatter v.4 which was suggested at many sites. Both says FAT32 when checked in windows 8.1

Downloaded the newest SdFat library from Fatlib16 yesterdays post and run the QuickStart.

Results: (tried all suggested pins, 4,8,10,53 with spi enabled and disabled and both cards, quarter full and half speeds.)

SPI pins:
MOSI: 51
MISO: 50
SCK: 52

SD chip select is the key hardware option.
Common values are:
Arduino Ethernet shield, pin 4
Sparkfun SD shield, pin 8
Adafruit SD shields and modules, pin 10

Enter the chip select pin number: 53

Disabling SPI device on pin 10

Card successfully initialized.

Card size: 1074 MB (MB = 1,000,000 bytes)

Can't read the card.
Try another SD card or reduce the SPI bus speed.
Edit spiSpeed in this sketch to change it.

Restarting

Enter the chip select pin number:

I have also earlier tried Adafruit Sdinfo and it recognized the kingston card as SD1 and elite pro as SD2. But couldn't find FAT16/FAT32 partition.

I've also tried to use 9v battery as power source, cause someone suggested that.

I'm really out of options and asking for help!

If you need more information, just ask!

-Ghorg

Seriously don't know what is happening.

I tried Sdformatter on Arduino and I'm getting various error reports by opening serial monitor and running it again like 3 times in a row and then it MAY recognize the card.

Got same results when used 53 instead of SS.

Don't know why it says 1mb when i use 8gb card.

Some times it says 1024mb. Also tried the F
Enter option: F
Card Size: 1024 MB, (MB = 1,048,576 bytes)

Erasing
error: erase failed
SD error: e,0

Sieppaa.PNG

Sieppaa3.PNG

And Sdinfo says this when speed=Quarter and cs=53 or when cs=SS

SdFat version: 20141111
type any character to start
init time: 3 ms
Card type: SD2
Manufacturer ID: 0X4
OEM ID: A
Product: SMI-S
Version: 4.4
Serial number: 0X3
Manufacturing date: 6/2001
cardSize: 1073.74 MB (MB = 1,000,000 bytes)
flashEraseSize: 128 blocks
eraseSingleBlock: false
OCR: 0X80FF8000
read MBR failed
SD errorCode: 0X11
SD errorData: 0XFF
type any character to start

Yesterday I bought another sd card 4gb kingston. Got just normal errors about "couldn't read the card, can't find partition fat16/32"

I think there are some wiring issues in my shield or tft since kingston 1 gb found files one time after running quickstart like 7 times in a row. I am running the sketch at QUARTER speed.

Restarting

Enter the chip select pin number: 53

Assuming the SD is the only SPI device.
Edit DISABLE_CHIP_SELECT to disable another device.

Card successfully initialized.

Can't determine the card size.
Try another SD card or reduce the SPI bus speed.
Edit spiSpeed in this sketch to change it.

Restarting

Enter the chip select pin number: 53

Assuming the SD is the only SPI device.
Edit DISABLE_CHIP_SELECT to disable another device.

Card successfully initialized.

Can't determine the card size.
Try another SD card or reduce the SPI bus speed.
Edit spiSpeed in this sketch to change it.

Restarting

Enter the chip select pin number: 53

Assuming the SD is the only SPI device.
Edit DISABLE_CHIP_SELECT to disable another device.

Card successfully initialized.

Card size: 1030 MB (MB = 1,000,000 bytes)

Volume is FAT16, Cluster size (bytes): 16384

Files found (name date time size):
SYSTEM~1/      2015-02-03 09:33:28
  INDEXE~1       2015-02-03 09:33:28 76
PIC101.RAW     2011-01-29 02:39:38 153600
PIC102.RAW     2011-01-30 01:52:00 153600
PIC103.RAW     2011-01-30 01:52:12 153600
PIC104.RAW     2011-01-30 01:52:32 153600
PIC105.RAW     2011-01-30 01:52:40 153600
PIC106.RAW     2011-01-30 01:52:50 153600
PIC107.RAW     2011-01-30 01:53:00 153600
PIC108.RAW     2011-01-30 01:53:12 153600
PIC109.RAW     2011-01-30 01:53:22 153600
PIC110.RAW     2011-01-30 01:53:30 153600
PIC201.RAW     2011-01-29 02:39:54 192000
PIC202.RAW     2011-01-30 01:53:54 192000
PIC203.RAW     2011-01-30 01:54:06 192000
PIC204.RAW     2011-01-30 01:54:16 192000
PIC205.RAW     2011-01-30 01:54:28 192000
PIC206.RAW     2011-01-30 01:54:40 192000
PIC207.RAW     2011-01-30 01:54:52 192000
PIC208.RAW     2011-01-30 01:55:02 192000
PIC209.RAW     2011-01-30 01:55:14 192000
PIC210.RAW     2011-01-30 01:55:24 192000
PIC301.RAW     2011-01-29 02:40:08 153600
PIC302.RAW     2011-01-29 02:40:18 153600
PIC303.RAW     2011-01-29 02:40:28 153600
PIC304.RAW     2011-01-29 02:40:38 153600
PIC305.RAW     2011-01-29 02:40:50 153600
PIC306.RAW     2011-01-29 02:41:00 153600
PIC307.RAW     2011-01-29 02:41:10 153600
PIC308.RAW     2011-01-29 02:41:20 153600
PIC309.RAW     2011-01-29 02:41:30 153600
PIC310.RAW     2011-01-29 02:41:38 153600
PIC401.RAW     2011-01-29 02:41:54 192000
PIC402.RAW     2011-01-29 02:42:06 192000
PIC403.RAW     2011-01-29 02:42:18 192000
PIC404.RAW     2011-01-29 02:42:28 192000
PIC405.RAW     2011-01-29 02:42:40 192000
PIC406.RAW     2011-01-29 02:42:52 192000
PIC407.RAW     2011-01-29 02:43:04 192000
PIC408.RAW     2011-01-29 02:43:16 192000
PIC409.RAW     2011-01-29 02:43:28 192000
PIC410.RAW     2011-01-29 02:43:38 192000
PIC501.RAW     2012-04-18 20:23:46 77440
PIC502.RAW     2012-04-18 20:23:58 77440
PIC503.RAW     2012-04-18 20:24:04 77440
PIC504.RAW     2012-04-18 20:24:54 77440
PIC505.RAW     2012-04-18 20:24:44 77440
PIC506.RAW     2012-04-18 20:24:38 77440
PIC507.RAW     2012-04-18 20:24:30 77440
PIC508.RAW     2012-04-18 20:24:24 77440
PIC509.RAW     2012-04-18 20:24:16 77440
PIC510.RAW     2012-04-18 20:24:10 77440
PIC601.RAW     2012-04-18 20:27:38 77440
PIC602.RAW     2012-04-18 20:27:34 77440
PIC603.RAW     2012-04-18 20:27:28 77440
PIC604.RAW     2012-04-18 20:27:24 77440
PIC605.RAW     2012-04-18 20:27:18 77440
PIC606.RAW     2012-04-18 20:27:12 77440
PIC607.RAW     2012-04-18 20:27:06 77440
PIC608.RAW     2012-04-18 20:27:00 77440
PIC609.RAW     2012-04-18 20:26:54 77440
PIC610.RAW     2012-04-18 20:26:46 77440
PIC701.RAW     2012-04-18 20:28:50 261120
PIC702.RAW     2012-04-18 20:28:42 261120
PIC703.RAW     2012-04-18 20:28:34 261120
PIC704.RAW     2012-04-18 20:28:28 261120
PIC705.RAW     2012-04-18 20:28:18 261120
PIC801.RAW     2012-04-18 20:30:22 768000
PIC802.RAW     2012-04-18 20:30:10 768000
PIC803.RAW     2012-04-18 20:29:56 768000
PIC804.RAW     2012-04-18 20:29:42 768000
PIC805.RAW     2012-04-18 20:29:28 768000

Success!  Type any character to restart.

Restarting

There might be some grounding or SPI issues. please help

Turns out the problem was the display's sd socket.

I bought a new catalex sd shield for mega and it works like a charm.

Now I can continue with my project

Enter the chip select pin number: 5

Disabling SPI device on pin 40

Card successfully initialized.

Card size: 8054 MB (MB = 1,000,000 bytes)

Volume is FAT32, Cluster size (bytes): 32768

Files found (name date time size):
SYSTEM~1/      2015-02-10 21:58:44
  INDEXE~1       2015-02-10 21:58:44 76

Success!  Type any character to restart.