0
votes

I have touchscreen TFT 2.8 Arduino MEGA 2560.

I have a project to do for my school, and it's been several days since I struck on something ..

I want to display an image on the screen, but when I compile the code example, in ''monitor series'' it makes me : Found ILI9325 LCD driver Initializing SD card ... failed! Loading image ' tiger.bmp ' File not found

I followed the tutorial given by the Adafruit website , here : http://learn.adafruit.com/2-8-tft-touch-shield/bitmaps

After searching through many forums , he was advised to try another example of code that reads the card and see if it is recognized. The name of the example is : CardInfo . But when I compile , these messages appear in ''monitor series'' :

initialization failed . Things to check: * Is a card is inserted ? * Is your wiring right? * Did you change the pin to match chipSelect your shield or module?

I changed the variable const int chipSelect = 4; chipSelect by const int = 10; but nothing changes ..

I followed this advice here : http://embedjournal.com/2013/06/arduino-sd-card-initialization-failed/ " The solution to this problem , Is That You -have to let digital pin 10 as output ( for the SD library to work) and turn ON it 's the pull up resistor by Adding " digitalWrite (10 , HIGH) ; " . Arduino Mega -have for you to do the same Exactly ignore pin 53 completely Call though the comment asks you to change it to 53."

But it doesn't work ..

I wonder if someone can give me the solution or advise me what I should do please because I can't stand not find solution..

Thanks ! :)

1
What's the brand of your SD card? My TFT screen only recognises Sandisk card.cloudycliff

1 Answers

0
votes

I don't know the exact reason why your SD card is not working but I can give you some suggestions on how to debug it.

First, check if your SD card is actually getting a clock pulse. You could so this by probing the clock pin with a scope.

Next, put out a 0x55, 0xAA sequence on the data out pin and see if you are getting anything at all. Then do a loop back test on the data in and out pins to verify that your SPI module is actually setup properly and working.

After this you just have to check your wiring of CS pin and if it is having a pull up. Arduino SD library is very stable and has been well tested. In the past I have had issues with some SD cards itself. So try to use different types of cards (size and make). Sometimes it is as simple as a very bad SD card connector which is giving you a loose contact.