2.4'' tft with spfd5408 HELP!!!!

Hello,
I have a 2.4 tft with spfd controller.I download the UTFT library.I connected everything and check everything a lot of times.
My problem is that the sketch I upload works fine,I can see it running on tft but the screen is always full of colored lines.
I upload some very simple code but everything I do the problem is the same.You can see the pictures.
I check the regulator on tft module and works fine 3.37v and 4.98v.I checked all cables and everything is ok!!!
http://www.ebay.com/itm/111263654864?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

http://s1371.photobucket.com/user/trikoupos/media/DSCN0638_zps1aafb5f6.jpg.html
this is the code:

// UTFT_Demo_320x240 (C)2012 Henning Karlsen
// web: http://www.henningkarlsen.com/electronics
//
// This program is a demo of how to use most of the functions
// of the library with a supported display modules.
//
// This demo was made for modules with a screen resolution
// of 320x240 pixels.
//
// This program requires the UTFT library.
//

#include <UTFT.h>

// Declare which fonts we will be using
extern uint8_t SmallFont;

// Uncomment the next line for Arduino 2009/Uno
UTFT myGLCD(SPFD5408A,A2,A1,A3,A4); // Remember to change the model parameter to suit your display module!

// Uncomment the next line for Arduino Mega
//UTFT myGLCD(ITDB32S,38,39,40,41); // Remember to change the model parameter to suit your display module!

void setup()
{
randomSeed(analogRead(0));

// Setup the LCD
pinMode(A0,OUTPUT); // for the UNO_SHIELD_1IN1
digitalWrite(A0,HIGH); // the RD pin must be set high
myGLCD.InitLCD();
myGLCD.setFont(SmallFont);
}

void loop()
{
int buf[318];
int x, x2;
int y, y2;
int r;

// Clear the screen and draw the frame
myGLCD.clrScr();

myGLCD.setColor(255, 0, 0);
myGLCD.fillRect(0, 0, 319, 13);
myGLCD.setColor(64, 64, 64);
myGLCD.fillRect(0, 226, 319, 239);
myGLCD.setColor(255, 255, 255);
myGLCD.setBackColor(255, 0, 0);
myGLCD.print("* Universal Color TFT Display Library *", CENTER, 1);
myGLCD.setBackColor(64, 64, 64);
myGLCD.setColor(255,255,0);
myGLCD.print(“http://electronics.henningkarlsen.com”, CENTER, 227);

myGLCD.setColor(0, 0, 255);
myGLCD.drawRect(0, 14, 319, 225);

// Draw crosshairs
myGLCD.setColor(0, 0, 255);
myGLCD.setBackColor(0, 0, 0);
myGLCD.drawLine(159, 15, 159, 224);
myGLCD.drawLine(1, 119, 318, 119);
for (int i=9; i<310; i+=10)
myGLCD.drawLine(i, 117, i, 121);
for (int i=19; i<220; i+=10)
myGLCD.drawLine(157, i, 161, i);

// Draw sin-, cos- and tan-lines
myGLCD.setColor(0,255,255);
myGLCD.print(“Sin”, 5, 15);
for (int i=1; i<318; i++)
{
myGLCD.drawPixel(i,119+(sin(((i*1.13)*3.14)/180)*95));
}

myGLCD.setColor(255,0,0);
myGLCD.print(“Cos”, 5, 27);
for (int i=1; i<318; i++)
{
myGLCD.drawPixel(i,119+(cos(((i*1.13)*3.14)/180)*95));
}

myGLCD.setColor(255,255,0);
myGLCD.print(“Tan”, 5, 39);
for (int i=1; i<318; i++)
{
myGLCD.drawPixel(i,119+(tan(((i*1.13)*3.14)/180)));
}

delay(2000);

myGLCD.setColor(0,0,0);
myGLCD.fillRect(1,15,318,224);
myGLCD.setColor(0, 0, 255);
myGLCD.setBackColor(0, 0, 0);
myGLCD.drawLine(159, 15, 159, 224);
myGLCD.drawLine(1, 119, 318, 119);

// Draw a moving sinewave
x=1;
for (int i=1; i<(31820); i++)
{
x++;
if (x==319)
x=1;
if (i>319)
{
if ((x==159)||(buf[x-1]==119))
myGLCD.setColor(0,0,255);
else
myGLCD.setColor(0,0,0);
myGLCD.drawPixel(x,buf[x-1]);
}
myGLCD.setColor(0,255,255);
y=119+(sin(((i
1.1)3.14)/180)(90-(i / 100)));
myGLCD.drawPixel(x,y);
buf[x-1]=y;
}

delay(2000);

myGLCD.setColor(0,0,0);
myGLCD.fillRect(1,15,318,224);

// Draw some filled rectangles
for (int i=1; i<6; i++)
{
switch (i)
{
case 1:
myGLCD.setColor(255,0,255);
break;
case 2:
myGLCD.setColor(255,0,0);
break;
case 3:
myGLCD.setColor(0,255,0);
break;
case 4:
myGLCD.setColor(0,0,255);
break;
case 5:
myGLCD.setColor(255,255,0);
break;
}
myGLCD.fillRect(70+(i20), 30+(i20), 130+(i20), 90+(i20));
}

delay(2000);

myGLCD.setColor(0,0,0);
myGLCD.fillRect(1,15,318,224);

// Draw some filled, rounded rectangles
for (int i=1; i<6; i++)
{
switch (i)
{
case 1:
myGLCD.setColor(255,0,255);
break;
case 2:
myGLCD.setColor(255,0,0);
break;
case 3:
myGLCD.setColor(0,255,0);
break;
case 4:
myGLCD.setColor(0,0,255);
break;
case 5:
myGLCD.setColor(255,255,0);
break;
}
myGLCD.fillRoundRect(190-(i20), 30+(i20), 250-(i20), 90+(i20));
}

delay(2000);

myGLCD.setColor(0,0,0);
myGLCD.fillRect(1,15,318,224);

// Draw some filled circles
for (int i=1; i<6; i++)
{
switch (i)
{
case 1:
myGLCD.setColor(255,0,255);
break;
case 2:
myGLCD.setColor(255,0,0);
break;
case 3:
myGLCD.setColor(0,255,0);
break;
case 4:
myGLCD.setColor(0,0,255);
break;
case 5:
myGLCD.setColor(255,255,0);
break;
}
myGLCD.fillCircle(100+(i20),60+(i20), 30);
}

delay(2000);

myGLCD.setColor(0,0,0);
myGLCD.fillRect(1,15,318,224);

// Draw some lines in a pattern
myGLCD.setColor (255,0,0);
for (int i=15; i<224; i+=5)
{
myGLCD.drawLine(1, i, (i1.44)-10, 224);
}
myGLCD.setColor (255,0,0);
for (int i=224; i>15; i-=5)
{
myGLCD.drawLine(318, i, (i
1.44)-11, 15);
}
myGLCD.setColor (0,255,255);
for (int i=224; i>15; i-=5)
{
myGLCD.drawLine(1, i, 331-(i1.44), 15);
}
myGLCD.setColor (0,255,255);
for (int i=15; i<224; i+=5)
{
myGLCD.drawLine(318, i, 330-(i
1.44), 224);
}

delay(2000);

myGLCD.setColor(0,0,0);
myGLCD.fillRect(1,15,318,224);

// Draw some random circles
for (int i=0; i<100; i++)
{
myGLCD.setColor(random(255), random(255), random(255));
x=32+random(256);
y=45+random(146);
r=random(30);
myGLCD.drawCircle(x, y, r);
}

delay(2000);

myGLCD.setColor(0,0,0);
myGLCD.fillRect(1,15,318,224);

// Draw some random rectangles
for (int i=0; i<100; i++)
{
myGLCD.setColor(random(255), random(255), random(255));
x=2+random(316);
y=16+random(207);
x2=2+random(316);
y2=16+random(207);
myGLCD.drawRect(x, y, x2, y2);
}

delay(2000);

myGLCD.setColor(0,0,0);
myGLCD.fillRect(1,15,318,224);

// Draw some random rounded rectangles
for (int i=0; i<100; i++)
{
myGLCD.setColor(random(255), random(255), random(255));
x=2+random(316);
y=16+random(207);
x2=2+random(316);
y2=16+random(207);
myGLCD.drawRoundRect(x, y, x2, y2);
}

delay(2000);

myGLCD.setColor(0,0,0);
myGLCD.fillRect(1,15,318,224);

for (int i=0; i<100; i++)
{
myGLCD.setColor(random(255), random(255), random(255));
x=2+random(316);
y=16+random(209);
x2=2+random(316);
y2=16+random(209);
myGLCD.drawLine(x, y, x2, y2);
}

delay(2000);

myGLCD.setColor(0,0,0);
myGLCD.fillRect(1,15,318,224);

for (int i=0; i<10000; i++)
{
myGLCD.setColor(random(255), random(255), random(255));
myGLCD.drawPixel(2+random(316), 16+random(209));
}

delay(2000);

myGLCD.fillScr(0, 0, 255);
myGLCD.setColor(255, 0, 0);
myGLCD.fillRoundRect(80, 70, 239, 169);

myGLCD.setColor(255, 255, 255);
myGLCD.setBackColor(255, 0, 0);
myGLCD.print(“That’s it!”, CENTER, 93);
myGLCD.print(“Restarting in a”, CENTER, 119);
myGLCD.print(“few seconds…”, CENTER, 132);

myGLCD.setColor(0, 255, 0);
myGLCD.setBackColor(0, 0, 255);
myGLCD.print(“Runtime: (msecs)”, CENTER, 210);
myGLCD.printNumI(millis(), CENTER, 225);

delay (10000);
}

Can someone tell me whats going wrong??
Thanks in advance…

1.- sorry about my english
2.- this is the key line to make this work:

UTFT myGLCD(SPFD5408A,A2,A1,A3,A4);

in that line you need to change the model and the pins of your tft module, so go into the folder where you installed the library and test the other models, i did it that way.

Good Luck!

its a faulty tft. i have one exactly the same issue.i also have a spare tft to check the code and it works perfectly.
j.

Thanks for your help.I tried anything so I think you are right.Its a faulty tft.I checked connections a lot of times but even with other libraries the results are the same.

Thanks.

Did anybody found out which setting are correct in this liene:

UTFT myGLCD(SPFD5408A,A2,A1,A3,A4);

These settings does not work :frowning:

I checked the pins of the LCD and my Arduino UNO.

It should be:

lCD -> Arduino UNO = Pin_number

RS -> A2 = 25
WR -> A1 = 24
CS -> A4 = 27
RST -> A5 = 28

=>

UTFT myGLCD(SPFD5408A,25,24,27,28);

But it does not work :frowning:

UTFT myGLCD(SPFD5408A,A2,A1,A3,A4);

hi hi have the same problem is the same SPFD5408A,
only is not can put the touch configuration
i found the factori chip is closed
no more
only in ebay no good screens
i use how temperature
y have a new screen
is ok
good function only no touch screen
dont have programs with good libreris for this
your problem is diferent problabily is blocken
bye

Good night…
I have a question for your library SPDF5408 Adafruit TFT LCD. How do I change the 8-bit data pin of TFT LCD to pin 22-29 or other digital pin on Arduino Mega 2560, and where I need to change its coding, is it on <SPFD5408_Adafruit_TFTLCD.h> or <SPFD5408_Adafruit_GFX.h>??
In my case, digital pin from 2-13 will be used for GSM Shield ?? Please guide me. Thank you!!!

Picture: https://github.com/JoaoLopesF/SPFD5408/issues/13

I see that in the current UTFT library there is no option for SPDF5408... theres a whole bunch of other ones listed in the keywords.txt file that comes with the library, is one of them going to work for SPDF5408? I've been trying them by brute force, but it is very time consuming and boring.

I know its a SPDF5408 because I can get the SPFD5408_Adafruit_GFX to work on it, but I am trying to implement a project that requires using the UTFT library.

I will give you a medal if it is actually a SPFD5408.

Please run the LCD_ID_readreg.ino sketch from the MCUFRIEND_kbv library.
It should say 54 08 for a genuine SPFD5408 e.g.

reg(0x0000) 54 08   ID: ILI9320, ILI9325, ILI9335, ...

As far as I know, UTFT does not support any of the Mcufriend Uno Shields.

MCUFRIEND_kbv supports about 40 different controllers.

David.