Go Down

Topic: Trouble loading image files from the SD to disaply on UTFT (Read 7153 times) previous topic - next topic

ghlawrence2000

#15
Feb 19, 2015, 10:45 pm Last Edit: Feb 19, 2015, 10:47 pm by ghlawrence2000
Have you tried 'sdinfo' the SDfat example sketch...... It is very good at helping with these issues........ also, have you changed your SD chip select pin to 53?

That's pretty much all I have to suggest now you soldered that jumper.

Regards,

Graham
UTFT_SdRaw now included in library manager!! ;) High speed image drawing from SD card to UTFT displays for Mega & DUE.
UTFT_GHL - a VASTLY upgraded version of UTFT_CTE. Coming soon to a TFT near you! 8) Shipping April 1 2016!

cristalpalace

Hi Graham.
This thread - and the other, you told about - was absolut helpfull for me. And 'first of all' it works very well.
Here my own constellation from today : MEGA2560 (clon), TFT/SD-Shield for MEGA V2.2, 7"-TFT-TouchScreen, with MD070SD Chip  (SaintSmart CP11015).
I told it for everyone who also had problems with starting this combination. So perhaps I can help too with my little experience.
Regards
Bodo

MaxUsatenko

I have same problem, but with UTFT display ILI9486. At my case arduino does not see SD card.

Code of program:

#include <SPI.h>
#include <SdFat.h>
#include <UTFT.h>
#include <UTFT_SdRaw.h>

#define SD_CHIP_SELECT  53

SdFat sd;

UTFT myGLCD(ILI9486, 38, 39, 40, 41);

extern uint8_t BigFont[];

UTFT_SdRaw myFiles(&myGLCD);

void setup()
{

  myGLCD.InitLCD();
  myGLCD.clrScr();
  myGLCD.setFont(BigFont);
 while (!sd.begin(SD_CHIP_SELECT)) {
    myGLCD.setColor(VGA_RED);

    myGLCD.print("SD Card failed!", CENTER, 100);
    delay(1000);
  }

  myGLCD.setColor(VGA_GREEN);
  myGLCD.print("SD Card initialised", CENTER, 100);

  delay(1000);

  myFiles.load(0, 0, 480, 320, "Arduino.RAW");
}

void loop()
{
}

Popol974

Hello Graham,

thanks for your amazing work! i already give you one more karma! lol


I have succeed to run your exemple UTFT_SDRaw but it only work with the sd on the CTE Shield, after soldering JP8.

I try everything i could but it doesnt work with the sdcard on the TFT reader...

Is someone know how to solve it?

The reader on the CTE is not simple to access...need to remove the TFT each time...not good.

Thanks for your help!

Olivier
Beginer in Arduino but 30 years of electronic love :)

Popol974

Hello,

i found an issue...its just the SPI speed...i put SPI_HALF_SPEED and now it works...here are the time comparaison :

With SPI_FULL_SPEED : on board CTE card reader :
Time to draw 240x240 raw (no extra buffer) (non inverted colour) 234 ms
Time to draw 240x240 raw (16*buffer) (inverted colour) 142 ms
Time to draw 240x240 portion from 4040x4040 raw image (non inverted colour) 376 ms
Time to draw 240x240 portion from 4040x4040 raw image (inverted colour) 376 ms
Time to draw 35 42x42 icons (0-34) from 2374x696 image 1132 ms
Time to draw 35 42x42 icons (35-69) from 2374x696 image 1126 ms
Time to draw 35 42x42 icons (70-104) from 2374x696 image 1130 ms
Time to draw 35 42x42 icons (105-139) from 2374x696 image 1127 ms
Time to draw 35 42x42 icons (140-174) from 2374x696 image 1131 ms
Time to draw 35 42x42 icons (175-209) from 2374x696 image 1132 ms





With SPI_HALF_SPEED : on board TFT card reader :

Time to draw 240x240 raw (no extra buffer) (non inverted colour) 257 ms
Time to draw 240x240 raw (16*buffer) (inverted colour) 165 ms
Time to draw 240x240 portion from 4040x4040 raw image (non inverted colour) 424 ms
Time to draw 240x240 portion from 4040x4040 raw image (inverted colour) 424 ms
Time to draw 35 42x42 icons (0-34) from 2374x696 image 1306 ms
Time to draw 35 42x42 icons (35-69) from 2374x696 image 1300 ms
Time to draw 35 42x42 icons (70-104) from 2374x696 image 1305 ms
Time to draw 35 42x42 icons (105-139) from 2374x696 image 1302 ms
Time to draw 35 42x42 icons (140-174) from 2374x696 image 1306 ms
Time to draw 35 42x42 icons (175-209) from 2374x696 image 1306 ms

As you can see, there is not a lot of difference...looks like a bit faster in SPI_FULL_SPEED...but when i look to the time to draw...just 12% average faster...

Hope it will help others with trouble shooting SPI_HALF/FULL_SPEED :)
Beginer in Arduino but 30 years of electronic love :)

Go Up