Arduino Forum

Using Arduino => Displays => Topic started by: art100 on Mar 06, 2014, 07:29 am

Title: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: art100 on Mar 06, 2014, 07:29 am
New shield new problem  :smiley-roll:
I buy 2-4-inch-TFT-touch-LCD-Screen-Module-For-Arduino-UNO  ]:D
link on pcb http://www.mcufriend.com bad :(
name on pcb noname :(
price very very low  ]:D
support not :(
link on page seller have problem :( https://drive.google.com/file/d/0B3hqYAvAOKllZ0M3d3E4REdiS2c/edit?usp=sharing
http://www.aliexpress.com/item/2-4-inch-TFT-touch-LCD-Screen-Module-For-Arduino-UNO-Free-Shipping/1418497586.html
(http://i058.radikal.ru/1403/87/ba1cf924a117.jpg)
On shield read 2 simple buffers on pins and 1 power suppler 5v-3.3v problem problem problem  ]:D
14 hours problem problem problem   :smiley-mr-green:
Yhooo-hooo-hooo
1-one example to work  :smiley-roll:
(http://s019.radikal.ru/i614/1403/50/cd4de6a09696.jpg)
very bad code  :smiley-zipper:
to work
(http://s43.radikal.ru/i101/1403/09/0348b50d6727.jpg)
(http://s020.radikal.ru/i706/1403/71/c0ea5a028eaa.jpg)

Quiest:
Maybe is work code for TFT+Touch+SD ?

-------------------------
example bad code to work
Code: [Select]

#include "TFTLCD.h"
#include "TouchScreen.h"


//Duemilanove/Diecimila/UNO/etc ('168 and '328 chips) microcontoller:



#define YP A1  // must be an analog pin, use "An" notation!
#define XM A2  // must be an analog pin, use "An" notation!
#define YM  7 // can be a digital pin
#define XP  6  // can be a digital pin

#define TS_MINX 150
#define TS_MINY 120
#define TS_MAXX 920
#define TS_MAXY 940

// For better pressure precision, we need to know the resistance
// between X+ and X- Use any multimeter to read it
// For the one we're using, its 300 ohms across the X plate
TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);

#define LCD_CS A3
#define LCD_CD A2
#define LCD_WR A1
#define LCD_RD A0
// optional
#define LCD_RESET A4

// Color definitions
#define BLACK           0x0000
#define BLUE            0x001F
#define RED             0xF800
#define GREEN           0x07E0
#define CYAN            0x07FF
#define MAGENTA         0xF81F
#define YELLOW          0xFFE0
#define WHITE           0xFFFF



TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);

#define BOXSIZE 40
#define PENRADIUS 3
int oldcolor, currentcolor;

void setup(void) {
 Serial.begin(9600);
 Serial.println("Paint!");
 
 tft.reset();
 
 uint16_t identifier = tft.readRegister(0x0);


 tft.initDisplay();
 tft.fillScreen(BLACK);
 
 tft.fillRect(0, 320-BOXSIZE, BOXSIZE, 320,MAGENTA );
 tft.fillRect(BOXSIZE, 320-BOXSIZE, BOXSIZE, 320,BLUE );
 tft.fillRect(BOXSIZE*2, 320-BOXSIZE, BOXSIZE, 320,CYAN );
 tft.fillRect(BOXSIZE*3, 320-BOXSIZE, BOXSIZE, 320, GREEN);
 tft.fillRect(BOXSIZE*4, 320-BOXSIZE, BOXSIZE, 320, YELLOW);
 tft.fillRect(BOXSIZE*5, 320-BOXSIZE, BOXSIZE, 320, RED);
// tft.fillRect(BOXSIZE*6, 0, BOXSIZE, BOXSIZE, WHITE);

// tft.drawRect(0, 0, BOXSIZE, BOXSIZE, WHITE);
currentcolor = RED;

 pinMode(13, OUTPUT);
}



#define MINPRESSURE 10
#define MAXPRESSURE 1000



void loop()
{
 digitalWrite(13, HIGH);
 Point p = ts.getPoint();
 digitalWrite(13, LOW);


 pinMode(XM, OUTPUT);
 pinMode(YP, OUTPUT);
 //pinMode(YM, OUTPUT);

 // we have some minimum pressure we consider 'valid'
 // pressure of 0 means no pressing!

 if (p.z > MINPRESSURE && p.z < MAXPRESSURE) {

   
   if (p.y < (TS_MINY-5)) {
     Serial.println("erase");
    // press the bottom of the screen to erase
     tft.fillRect(0, BOXSIZE, tft.width(), tft.height()-BOXSIZE, BLACK);
     
   }
   // turn from 0->1023 to tft.width
   p.x = map(p.x, TS_MINX, TS_MAXX, tft.width(), 0);
   p.y = map(p.y, TS_MINY, TS_MAXY, tft.height(), 0);

   if (p.y < BOXSIZE) {
      oldcolor = currentcolor;

 
      if (p.x < BOXSIZE) {
        currentcolor = RED;
     //   tft.drawRect(0, 0, BOXSIZE, BOXSIZE, WHITE);
      }
      else if (p.x < BOXSIZE*2) {
        currentcolor = YELLOW;
      //  tft.drawRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, WHITE);
      }
      else if (p.x < BOXSIZE*3) {
        currentcolor = GREEN;
      //  tft.drawRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, WHITE);
      }
      else if (p.x < BOXSIZE*4) {
        currentcolor = CYAN;
     //   tft.drawRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, WHITE);
      }
      else if (p.x < BOXSIZE*5) {
        currentcolor = BLUE;
  //      tft.drawRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, WHITE);
      }
      else if (p.x < BOXSIZE*6) {
        currentcolor = MAGENTA;
      //  tft.drawRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, WHITE);
      }
     
     // if (oldcolor != currentcolor) {
    //     if (oldcolor == RED) tft.fillRect(0, 0, BOXSIZE, BOXSIZE,MAGENTA );
   //      if (oldcolor == YELLOW) tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE,BLUE );
   //      if (oldcolor == GREEN) tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE,CYAN );
   //      if (oldcolor == CYAN) tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, GREEN);
   //      if (oldcolor == BLUE) tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, YELLOW);
   //      if (oldcolor == MAGENTA) tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, RED);
    //  }
   }
   if (((p.y-PENRADIUS) > BOXSIZE) && ((p.y+PENRADIUS) < tft.height())) {
     tft.fillCircle(240-p.x, 320-p.y, PENRADIUS, currentcolor);
   }
 }
}

maybe good code
arduino-2.6-7781-after12.22\libraries\TFTLCD-7781\TFTLCD??\TFTLCD.h
-----------------------------------------------------------^^^^-this is jock seller-or idiotism---:)
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: art100 on Mar 06, 2014, 03:41 pm
Quest?
Search sequence
#include....h...cpp...o

1.The current directory?
2. \arduino\ ??? \hardware\ ???
\arduino\ ??? \library\???
\arduino\ ??? \core\???
?
?
?
3.c:\windows\system32
(http://s017.radikal.ru/i435/1403/03/2df51fe6482c.png)

Where read help?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: art100 on Mar 07, 2014, 07:25 am
(http://i047.radikal.ru/1403/9c/101e78e65353.jpg)
Code: [Select]

#define LCD_CS A3   
#define LCD_CD A2   
#define LCD_WR A1   
#define LCD_RD A0   
// you can also just connect RESET to the arduino RESET pin
#define LCD_RESET A4
//Duemilanove/Diecimila/UNO/etc ('168 and '328 chips) microcontoller:
// Color definitions
#define BLACK           0x0000
#define BLUE            0x001F
#define RED             0xF800
#define GREEN           0x07E0
#define CYAN            0x07FF
#define MAGENTA         0xF81F
#define YELLOW          0xFFE0
#define WHITE           0xFFFF

#include "TFTLCD.h"

TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);

void setup(void) {
  Serial.begin(9600);
  Serial.println("8 Bit LCD test!");
 
 
  tft.reset();
 
  //uint16_t identifier = tft.readRegister(0x0);
//  if (identifier == 0x9325)
//  {
//   Serial.println("Found ILI9325");
// } else if (identifier == 0x9328)
  //{
  //  Serial.println("Found ILI9328");
  //} else
// {
//   Serial.print("Unknown driver chip ");
//   Serial.println(identifier, HEX);
  //  while (1);
  //} 

  tft.initDisplay();
 
  testtext(YELLOW);


}

void loop(void) {


}



void testFillRoundRect() {
  tft.fillScreen(BLACK);
 
  for (uint16_t x=tft.width(); x > 20 ; x-=6) {
    tft.fillRoundRect(tft.width()/2 -x/2, tft.height()/2 -x/2 , x, x, x/8,  tft.Color565(0, x, 0));
}
}

void testRoundRect() {
  tft.fillScreen(BLACK);
 
  for (uint16_t x=0; x < tft.width(); x+=6) {
    tft.drawRoundRect(tft.width()/2 -x/2, tft.height()/2 -x/2 , x, x, x/8, tft.Color565(x, 0, 0));
}
}

void testtriangles() {
  tft.fillScreen(BLACK);
  for (uint16_t i=0; i<tft.width()/2; i+=5) {
    tft.drawTriangle(tft.width()/2, tft.height()/2-i,
                     tft.width()/2-i, tft.height()/2+i,
                     tft.width()/2+i, tft.height()/2+i, tft.Color565(0, 0, i));
  }
}

void testfilltriangles() {
  tft.fillScreen(BLACK);
 
  for (uint16_t i=tft.width()/2; i>10; i-=5) {
    tft.fillTriangle(tft.width()/2, tft.height()/2-i,
                     tft.width()/2-i, tft.height()/2+i,
                     tft.width()/2+i, tft.height()/2+i,
                     tft.Color565(0, i, i));
    tft.drawTriangle(tft.width()/2, tft.height()/2-i,
                     tft.width()/2-i, tft.height()/2+i,
                     tft.width()/2+i, tft.height()/2+i, tft.Color565(i, i, 0));   
  }
}
void testtext(uint16_t color) {
  tft.fillScreen(BLACK);
  tft.setCursor(0, 20);
  tft.setTextColor(color);
  tft.setTextSize(3);
  tft.println("Hello aitendo!");
  // tft.setTextSize(3);
  //tft.println(1234.56);
  //tft.setTextSize(3);
  //tft.println(0xDEADBEEF, HEX);
}

void testfillcircles(uint8_t radius, uint16_t color) {
  for (uint16_t x=radius; x < tft.width(); x+=radius*2) {
    for (uint16_t y=radius; y < tft.height(); y+=radius*2) {
      tft.fillCircle(x, y, radius, color);
    }
  } 
}

void testdrawcircles(uint8_t radius, uint16_t color) {
  for (uint16_t x=0; x < tft.width()+radius; x+=radius*2) {
    for (uint16_t y=0; y < tft.height()+radius; y+=radius*2) {
      tft.drawCircle(x, y, radius, color);
    }
  } 
}


void testfillrects(uint16_t color1, uint16_t color2) {
tft.fillScreen(BLACK);
for (uint16_t x=tft.width()-1; x > 6; x-=6) {
   //Serial.println(x, DEC);
   tft.fillRect(tft.width()/2 -x/2, tft.height()/2 -x/2 , x, x, color1);
   tft.drawRect(tft.width()/2 -x/2, tft.height()/2 -x/2 , x, x, color2);
}
}

void testdrawrects(uint16_t color) {
tft.fillScreen(BLACK);
for (uint16_t x=0; x < tft.width(); x+=6) {
   tft.drawRect(tft.width()/2 -x/2, tft.height()/2 -x/2 , x, x, color);
}
}

void testfastlines(uint16_t color1, uint16_t color2) {
   tft.fillScreen(BLACK);
   for (uint16_t y=0; y < tft.height(); y+=5) {
     tft.drawHorizontalLine(0, y, tft.width(), color1);
   }
   for (uint16_t x=0; x < tft.width(); x+=5) {
     tft.drawVerticalLine(x, 0, tft.height(), color2);
   }
 
}

void testlines(uint16_t color) {
   tft.fillScreen(BLACK);
   for (uint16_t x=0; x < tft.width(); x+=6) {
     tft.drawLine(0, 0, x, tft.height()-1, color);
   }
   for (uint16_t y=0; y < tft.height(); y+=6) {
     tft.drawLine(0, 0, tft.width()-1, y, color);
   }
   
   tft.fillScreen(BLACK);
   for (uint16_t x=0; x < tft.width(); x+=6) {
     tft.drawLine(tft.width()-1, 0, x, tft.height()-1, color);
   }
   for (uint16_t y=0; y < tft.height(); y+=6) {
     tft.drawLine(tft.width()-1, 0, 0, y, color);
   }
   
   tft.fillScreen(BLACK);
   for (uint16_t x=0; x < tft.width(); x+=6) {
     tft.drawLine(0, tft.height()-1, x, 0, color);
   }
   for (uint16_t y=0; y < tft.height(); y+=6) {
     tft.drawLine(0, tft.height()-1, tft.width()-1, y, color);
   }

   tft.fillScreen(BLACK);
   for (uint16_t x=0; x < tft.width(); x+=6) {
     tft.drawLine(tft.width()-1, tft.height()-1, x, 0, color);
   }
   for (uint16_t y=0; y < tft.height(); y+=6) {
     tft.drawLine(tft.width()-1, tft.height()-1, 0, y, color);
   }
}


void testBars() {
  uint16_t i,j;
  for(i=0; i < tft.height(); i++)
  {
    for(j=0; j < tft.width(); j++)
    {
      if(i>279) tft.writeData(WHITE);
      else if(i>239) tft.writeData(BLUE);
      else if(i>199) tft.writeData(GREEN);
      else if(i>159) tft.writeData(CYAN);
      else if(i>119) tft.writeData(RED);
      else if(i>79) tft.writeData(MAGENTA);
      else if(i>39) tft.writeData(YELLOW);
      else tft.writeData(BLACK);
    }
  }
}

----------------------------------
Message
xin tu
Thu Mar 06 22:13:18 PST 2014
Friend:

I'm sorry for it.

The library is support by the factory.
If you think library is no effect for you.
You can find information of screen in Google website.
The ship is 7781.

Thank you for your understanding.
Best regards.
Lynn
----------------------------
Speed speed support only 4 day :)

This is chip 7781 :) - jock

Code: [Select]

 // find the TFT display
 uint16_t identifier = tft.readRegister(0x0);
 if (identifier == 0x9325) {
   Serial.println("Found ILI9325");
 } else if (identifier == 0x9328) {
   Serial.println("Found ILI9328");
 } else {
   Serial.print("Unknown driver chip ");//<-have answer
   Serial.println(identifier, HEX);
   while (1);
 }

have answer
Unknown driver chip 7783
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: art100 on Mar 07, 2014, 08:28 am
Quest?
Search sequence library in compiller arduino?
#include....h..


Compiller undestand path?
#include c:/workarduino/test20140307094200/tftlcdhina7783.h
#include c:/workarduino/test20140307094200/touchscreenchina7783.h
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: art100 on Mar 07, 2014, 05:13 pm
http://yadi.sk/d/cWpeNS53K8S67 (http://yadi.sk/d/cWpeNS53K8S67)
http://downloads.arduino.cc/arduino-1.5.6-r2-windows.exe
example:
C:\Arduino\libraries\TFTLCD\examples\tft_paint\tft_paint.pde
05.10.2013  14:46             3 615 tft_paint.pde
Code: [Select]

#include "TFTLCD.h"
#include "TouchScreen.h"


#define YP A2  
#define XM A1
#define YM 6
#define XP 7  


#define TS_MINX 120
#define TS_MINY 120
#define TS_MAXX 930
#define TS_MAXY 950

TouchScreen ts = TouchScreen(XP, YP, XM, YM, 400);

#define LCD_CS A3
#define LCD_CD A2
#define LCD_WR A1
#define LCD_RD A0
#define LCD_RESET A4

// Color definitions
#define BLACK           0x0000
#define BLUE            0x001F
#define RED             0xF800
#define GREEN           0x07E0
#define CYAN            0x07FF
#define MAGENTA         0xF81F
#define YELLOW          0xFFE0
#define WHITE           0xFFFF



TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);

#define BOXSIZE 40
#define PENRADIUS 3
int oldcolor, currentcolor;

void setup(void) {
 Serial.begin(9600);
 Serial.println("Paint!");
 
 tft.reset();

 tft.initDisplay();
 tft.fillScreen(BLACK);
 
 tft.fillRect(0, 0, BOXSIZE, BOXSIZE, RED);
 tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, YELLOW);
 tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, GREEN);
 tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, CYAN);
 tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, BLUE);
 tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, MAGENTA);
// tft.fillRect(BOXSIZE*6, 0, BOXSIZE, BOXSIZE, WHITE);

tft.drawRect(0, 0, BOXSIZE, BOXSIZE, WHITE);
currentcolor = RED;

 pinMode(13, OUTPUT);

}


#define MINPRESSURE 10
#define MAXPRESSURE 1000




void loop()
{
 digitalWrite(13, HIGH);
 Point p = ts.getPoint();
 digitalWrite(13, LOW);

 pinMode(XM, OUTPUT);
 pinMode(YP, OUTPUT);

 if (p.z > MINPRESSURE && p.z < MAXPRESSURE) {
/*
    Serial.print(p.y);
    Serial.print(" , ");
 Serial.println(p.x);
   delay(1);
 */  
   if (p.x < (TS_MINY-5)) {
     Serial.println("erase");
    // press the bottom of the screen to erase
     tft.fillRect(0, BOXSIZE, tft.width(), tft.height()-BOXSIZE, BLACK);
     
   }
   // turn from 0->1023 to tft.width
   p.y = map(p.y, TS_MINX, TS_MAXX, tft.width(), 0);
   p.x = map(p.x, TS_MINY, TS_MAXY, tft.height(), 0);

   if (p.x < BOXSIZE) {
      oldcolor = currentcolor;

 
      if (p.y < BOXSIZE) {
        currentcolor = RED;
        tft.drawRect(0, 0, BOXSIZE, BOXSIZE, WHITE);
      }
      else if (p.y < BOXSIZE*2) {
        currentcolor = YELLOW;
        tft.drawRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, WHITE);
      }
      else if (p.y < BOXSIZE*3) {
        currentcolor = GREEN;
        tft.drawRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, WHITE);
      }
      else if (p.y < BOXSIZE*4) {
        currentcolor = CYAN;
        tft.drawRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, WHITE);
      }
      else if (p.y < BOXSIZE*5) {
        currentcolor = BLUE;
        tft.drawRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, WHITE);
      }
      else if (p.y < BOXSIZE*6) {
        currentcolor = MAGENTA;
        tft.drawRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, WHITE);
      }
     
      if (oldcolor != currentcolor) {
         if (oldcolor == RED) tft.fillRect(0, 0, BOXSIZE, BOXSIZE, RED);
         if (oldcolor == YELLOW) tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, YELLOW);
         if (oldcolor == GREEN) tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, GREEN);
         if (oldcolor == CYAN) tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, CYAN);
         if (oldcolor == BLUE) tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, BLUE);
         if (oldcolor == MAGENTA) tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, MAGENTA);
      }
   }
   if (((p.x-PENRADIUS) > BOXSIZE) && ((p.x+PENRADIUS) < tft.height())) {
     tft.fillCircle(p.y, p.x, PENRADIUS, currentcolor);
   }
 }
}

Code: [Select]

...
#define YP A2  
#define XM A1
#define YM 6
#define XP 7  
...
#define LCD_CS A3
#define LCD_CD A2
#define LCD_WR A1
#define LCD_RD A0
#define LCD_RESET A4
...


Quest:
input and output on 1 pin?
#define LCD_CD A2 // output
#define LCD_WR A1// output
#define YP A2 //intput
#define XM A1 // input
This is work code?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: art100 on Mar 07, 2014, 05:24 pm
Now result:
1. SD card - bed.
2. touch - bed.
3.LCD 320x240 - work - example in old compiller up. TFTLCD-7781...

only 1 example to work
C:\arduino-2.6-7781-after12.22\libraries\TFTLCD778X\examples\graphicstest\graphicstest.pde

#define LCD_CS A3    
#define LCD_CD A2    
#define LCD_WR A1  
#define LCD_RD A0    
...
work pin and D0...7
...
bed
:smiley-sleep:

Forum was very helpful thank you for the informative discussion.
Strangeness in the distribution of input output directly in compilers such.
Im sorry on my english, china, italian language.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: art100 on Mar 07, 2014, 06:14 pm
(http://s52.radikal.ru/i137/1403/1b/8d638a335126.jpg).
This is no jock.
This is fact. :(
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: art100 on Mar 08, 2014, 04:46 pm
Pins in out this really now all to work?

Poll resistors screen
and
immediately output to the screen simultaneously,
it is now so fashionable?

i to write code to work
Code: [Select]

//20140208 art100  tft2.4" st7783 shield on arduino uno
// art100 write message
//#include "st7783SD.h" // pins SD_SS-10 SD_DI-11(in) SD_DO-12(out) SD_SCK-13 no work
//#include "st7783TFT.h" //has not written
//#include "st7783TouchScreen.h" //has not written
#include "TFTLCD.h" // work
#include "TouchScreen.h" // bad but it works
//TouchScreen define
#define YP A1 //tftloop-YU pcbundertft-13 arduinoshieldLCD_WR!!! arduinouno-A1
#define XM A2 //tftloop-XR pcbundertft-14 arduinoshieldLCD_RS!!! arduinouno-A2
#define YM 7  //tftloop-XR pcbundertft-15 arduinoshieldLCD_D7 arduinouno-7
#define XP 6  //tftloop-XR pcbundertft-12 arduinoshieldLCD_D6 arduinouno-6
#define TS_MINX 150//0
#define TS_MINY 120//0
#define TS_MAXX 920//900//320      //for calibrate analog resistans ~1500om/700om
#define TS_MAXY 940//800//900//240 //for calibrate analog resistans ~1500om/700om
// For better pressure precision, we need to know the resistance// between X+ and X- Use any multimeter to read it
// For the one we're using, its 300 ohms across the X plate
TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);
//TFT  define
#define LCD_RESET A4//
#define LCD_CS A3
#define LCD_CD A2 //cmosbuffer-arduinoshieldLCD_RS!!! arduinouno-A2 this is jock :-?
#define LCD_WR A1 //cmosbuffer-arduinoshieldLCD_WR!!! arduinouno-A1 this is jock :-?
#define LCD_RD A0
// Color definitions
#define WHITE           0xFFFF
#define BLACK           0x0000
#define RED             0xF800
#define BLUE            0x001F
#define GREEN           0x07E0
#define YELLOW          0xFFE0
TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);
//SD define //has not written
#define bordur   5
#define pen      3
//---------------------------------------
void setup(void) {
  Serial.begin(9600);
  Serial.println("Paint");
  tft.reset();
  uint16_t identifier = tft.readRegister(0x0);
  tft.initDisplay();
  tft.fillScreen(RED);
}
#define MINPRESSURE 10    // analog calibrate
#define MAXPRESSURE 1000  // analog calibrate
//=======================================
void loop(){
  Point p = ts.getPoint(); // get analog point
  pinMode(XM, OUTPUT); //2 chip on one pins
  pinMode(YP, OUTPUT); //2 chip on one pins
  if (p.z > MINPRESSURE && p.z < MAXPRESSURE) { // analog calibrate
    p.x = map(p.x, TS_MINX, TS_MAXX, 0, tft.width ()); // aprocsimate variable
    p.y = map(p.y, TS_MINY, TS_MAXY, 0, tft.height()); // aprocsimate variable
   
//    if (300< p.x) { // erase only on bordur  //no need have reset button
//      Serial.println("erase"); // test
//      tft.fillRect(0, 0, tft.width(), tft.height(), RED);// BLACK); //fill black
//    }
   
    // test
    Serial.print("getPoint x=");Serial.print(p.x);Serial.print(" y=");Serial.print(p.y);Serial.print(" PRESSURE=");Serial.print(p.z); 
   
    // paint
    if (((p.x)<tft.width()) && ((p.y)<tft.height())) { tft.fillRect(p.x,p.y,pen,pen,GREEN); }
  }
}


Need critique of the code?

http://yadi.sk/d/EPYljwnIKAWUT (http://yadi.sk/d/EPYljwnIKAWUT)
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: art100 on Mar 23, 2014, 09:27 am
jock 2
  tft.fillScreen(BLACK); very slow  =(
Code: [Select]

// art100 write message
//TOUCH PCB ARDUINO UNO
//YU 13 A1
//XL 12 6
//YD 15 7
//XR 14 A2     
//TFT   
//A
//K1
//K2
//K3
//K4
#include "TFTLCD.h"
//pins
#define LCD_RESET A4
#define LCD_CS A3   
#define LCD_CD A2   
#define LCD_WR A1   
#define LCD_RD A0   
// Color definitions
#define BLACK           0x0000
#define BLUE            0x001F
#define RED             0xF800
#define GREEN           0x07E0
#define CYAN            0x07FF
#define MAGENTA         0xF81F
#define YELLOW          0xFFE0
#define WHITE           0xFFFF
TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);
const int analogInPin = A5;  // Analog input pin that the potentiometer is attached to
//const int analogInPin = A4; // :(
//const int analogInPin = A3;// :(
//const int analogInPin = A2;// :(
//const int analogInPin = A1;// :(
//const int analogInPin = A0;// :(
//const int analogInPin = A-1;// ;)
//const int analogInPin = A-2;// ;)
//const int analogInPin = A-3;// ;)
int sensorValue = 0;        // value read from the pot
int outputValue = 0;        // value output to the PWM (analog out)
//-----------------------
void setup(void) {
  Serial.begin(9600);
  Serial.println("8 Bit LCD test! more pinssssss");
  tft.reset();
  tft.initDisplay();
  tft.fillScreen(BLACK); // very slooooooow
//  testtext(YELLOW);
}
//===================
void loop(void) {
//    tft.initDisplay();
    tft.fillScreen(BLACK); // very slooooooow
   
    // read the analog in value:
  sensorValue = analogRead(analogInPin);           
  // map it to the range of the analog out:
//  outputValue = map(sensorValue, 0, 1023, 0, 255);
  outputValue = map(sensorValue, 0, 1023, 0, 240);//lcd 320x240
  // print the results to the serial monitor:
  Serial.print("sensor = " );  Serial.print(sensorValue);  Serial.print("\t output = ");  Serial.println(outputValue); 
 
for (uint16_t y=0; y<tft.height(); y+=10) {
  if(180<outputValue) {tft.drawHorizontalLine(  0, y, outputValue,   RED);}
  else{                tft.drawHorizontalLine(  0, y, outputValue, GREEN);}
}


Serial.println("tft.drawHorizontalLine(125, y, pin analog A5 only , GREEN);");
delay(1000); 
//delay(1);

}



http://yadi.sk/d/dHTPynHxL35v6
http://yadi.sk/d/xjjgeolAL35wT
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Jun 02, 2014, 04:20 pm
So have you managed to get this fully working?

Regards
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: marcoseduardo on Jun 10, 2014, 06:25 am
I have the same problem with the same board.

I had bought this TFT 2.4 LCD Touch Shield for over a year, but only now I could test it. I can only see a white screen (backlight).
My Arduino is a Duemilanove.

Can you help me?
I just dont know where to start to make it work.




Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Jun 10, 2014, 06:57 pm
Use the libraries for the ST7781R controller.
Adafruit has a 2.8" TFT with the same controller. You can use those.

Just dont use the version above. Aprarently the poster hasnt gone anywhere and they dont work with the current version of the IDE.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: marcoseduardo on Jun 10, 2014, 07:15 pm
Thank you for the tip.
I will try again with that and then return here to tell what happend.

Regards
Marcos
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: ThomasDG on Jun 11, 2014, 01:24 pm
I also bought this shield and after searching the web found this page with a working library and demos:
http://www.smokeandwires.co.nz/blog/a-2-4-tft-touchscreen-shield-for-arduino/

Hope this might help some of you...
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: berni_ on Jun 14, 2014, 12:42 am
Hi, I'm newbie with displays, and after more or less difficulties, I could make the things runing,
I share some observations:
On arduino UNO, after mapping correctly the pins according to display design, it is working quite well with a library called TFTLCD, found in this forum: http://misc.ws/2013/11/08/touch-screen-shield-for-arduino-uno/
Connected to  Arduino MEGA, is is more complicated, the TFT pins D0 to D7 must be connected to pins 22 to 29, the other pins are unchanged (MEGA has strange port arrangement connected to digital pins 0 to 13, therefore the library is not able to use the shield directly connected to MEGA). I have made the tes and it is working well also.
The touchscreen share the same pins as TFT, therefore it can be used only when LCD_CS is high (LCD outputs are high impedance). To run the touchscreen alone, on UNO, this is added in setup():
  pinMode(A3, OUTPUT);
  digitalWrite(A3, HIGH);
The SD card is also working well... BUT there is a problem: the voltage given to the SD is 4.3V, and the absolute maximum voltage allowed for SD is 3.6V... DANGER to burn the SD card. This is caused by the HC245 buffer, which is not a level shifter, it has internal diodes between I/O and VCC and it push up the VCC3.3V by taking current on the arduino I/O. When Arduino is connected to USB (USB voltage on my computer=4.6V), the SD is powered at 3.9V; but with the jack, the SD has 4.3V.
I am not sure how to solve that... adding level shfters somewhere... The most safe is not using the SD slot at all.

About the libraries for TFT:
The author Mike McCaule, explained he has used the Adafruit TFT library, and modified several elements: capability to mirror X and Y, update the pins for UNO and MEGA, and use a faster method for rotation.
Anyway, it is very slow. This display is able to show moovies at 60fps, but filling it with plain color, it takes ~0.3 second on Arduino.
320x240=76800 pixels with 16MHz processor, that means ~70 CPU clock per pixel, it seems not very optimized...

Also the tested library has poor text function (the text background is always transparent, making problems to overwrite an existing text; font management does not exist, writing bigger than 8point font is managed by zoom 2, 3, 4, ... times the 8point font, the result is slow and ugly).
The display has some hardware accelerator (scrolling functions, layers management,...), but this is not used with the library; except rotation.

Does someone here has made comparaison between the available libraries?

Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Jun 14, 2014, 12:59 am
I find the adafruit the best compromise between speed and size.
I use a dedicated arduino mini just to drive the display and SD card. The master only sends commands via serial, so the latency is reduced and its cheap to implement


One note about the last posters link - the touchscreen works perfectly with that version, so a ++!


Now the thing with this displays is that the arduino will never make them fast, unless you use a Due or upgrade to a cortex. maple would be brilliant but there are no libraries.

What i do is create the simbols using the fill reclanges and fill lines. The same functions can be used to clear only a specific area of the screen, so the result is a very fast display.

Attached is an example. This one refreshes very quicly

Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: berni_ on Jun 15, 2014, 07:44 pm
I will check the latest adafruit library for faster operation. Nice example casemod!

I have seen on ATMEGA2560 / 1280 data sheet, it has an external memory interface:

ATMEGA1280 pin connections to SRAM device:
Port A = Multiplexed Address low byte (A0....A7) / Data (D0....D7) <--------> Direct connection to SRAM (D0...D7) and connected to Input D of octal latch (typically "74 x 573" or equivalent) to (A0.....A7) of SRAM chip
Port C = Address high byte (A8....A15) <--------> direct connection to for example SRM (A8....A15)
Port G Pin 0 = WR (Write strobe to external memory) <-------->  direct connection to for example SRAM WR
Port G Pin 1 = RD (Read strobe to external memory) <-------->  direct connection to for example SRAM RD
Port G Pin 2 = ALE  (Address Latch Enable to external memory) <-------->  Connected to G Input of octal latch (typically "74 x 573" like 74 x 573)


Using the hardware pins dedicated to communicat to external memory should make the software several times faster, as fast as using internal RAM. If I have time, I will make a try.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Jun 16, 2014, 02:26 am

I will check the latest adafruit library for faster operation. Nice example casemod!

I have seen on ATMEGA2560 / 1280 data sheet, it has an external memory interface:

ATMEGA1280 pin connections to SRAM device:
Port A = Multiplexed Address low byte (A0....A7) / Data (D0....D7) <--------> Direct connection to SRAM (D0...D7) and connected to Input D of octal latch (typically "74 x 573" or equivalent) to (A0.....A7) of SRAM chip
Port C = Address high byte (A8....A15) <--------> direct connection to for example SRM (A8....A15)
Port G Pin 0 = WR (Write strobe to external memory) <-------->  direct connection to for example SRAM WR
Port G Pin 1 = RD (Read strobe to external memory) <-------->  direct connection to for example SRAM RD
Port G Pin 2 = ALE  (Address Latch Enable to external memory) <-------->  Connected to G Input of octal latch (typically "74 x 573" like 74 x 573)


Using the hardware pins dedicated to communicat to external memory should make the software several times faster, as fast as using internal RAM. If I have time, I will make a try.



Not quite sure what you're talking about.
Performance is limited by the actual core speed, not the memory itself.

Both the Mega and the UNO are just slow, with the mega having more pins. Technically you can make the LCD on the mega a bit faster by using 16 bit interface, but just a bit.

To unlock the potential of such LCD's you need to use an arduino due or other arm device like a stm32 or a mbed compatible device. In fact with the due you can even crank an SPI display way above the 8MHz limit an uno/mega can drive it.

But if you just want to replace a HD44780 LCD and can live with monochrome graphics on this displays a £3 arduino mini can take care of driving the display quite reasonably. Its just a lot of work writing the code
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: berni_ on Jun 22, 2014, 07:28 pm
It's the hardware peripheral available on MEGA2560 micros, called "external memory interface". The WR, RD, ALE pins  are manages automatically, no need to set/clear these pins by program. It is designed for connecting more SRAM directly to the uC.
In the code, display memory is then addresses with pointers, exactly the same way as internal RAM. I have used that a long time ago to interface displays with 8051 micros; it should work here also.

Anyway, by using the latest Adafruit library, it is faster than before (~2x).
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: berni_ on Jun 22, 2014, 08:06 pm
Touchscreen calibation
I have written a small function to calibtrate the TS with the display. In every examples I have seen, calibration is done at compile time, and require multiple trys and recompile if touch point is not aligned with TFT pixels. I was inspired by my vintage Palm, it has the same feature.
Maybe someone will save time to reuse it.
It is written for TFTLCD library (from Adafruit, June 2014) + TouchScreen (also from Adafruit)

The macros with TS calibration parameters must be changed to variables
Code: [Select]

/*//Macros replaced by variables
#define TS_MINX 150
#define TS_MINY 120
#define TS_MAXX 920
#define TS_MAXY 940*/
short TS_MINX=150;
short TS_MINY=120;
short TS_MAXX=920;
short TS_MAXY=940;

and the function, that can be called at the end of Setup() function. It works well with tftpaint example
Code: [Select]

void calibrate_TS(void){
  TSPoint p1, p2;
  int16_t temp;
  int32_t tempL;
  tft.fillScreen(BLACK);
  tft.fillCircle(10,10,4,WHITE); //show the first point
  tft.setCursor(5, 30); tft.setTextColor(WHITE);  tft.setTextSize(1);
  tft.println("Please touch the dot");
  do {  p1 = ts.getPoint(); }while((p1.z < MINPRESSURE) || (p1.z > MAXPRESSURE)); // wait touch
  pinMode(XM, OUTPUT);    pinMode(YP, OUTPUT); //Pins configures again for TFT control
  tft.fillScreen(BLACK);
  tft.fillCircle(230,310,4,WHITE); //show the 2nd point
  tft.setCursor(50, 280);
  tft.println("Please touch the other dot");
  delay (500); // debunce
  do {  p2= ts.getPoint(); }while((p2.z < MINPRESSURE )|| (p2.z > MAXPRESSURE));
  pinMode(XM, OUTPUT);    pinMode(YP, OUTPUT);
  tft.fillScreen(BLACK);
  delay (300);
  temp=p2.x-p1.x; // Calculate the new coefficients, get X difference
  tempL=((long)temp*1024)/(tft.width()-20);
  TS_MINX=p1.x-( (tempL*10)>>10);// 10 pixels du bord
  TS_MAXX=p1.x+( (tempL*tft.width())>>10);// 220 pixels entre points
  temp=p2.y-p1.y; // ¨get Y difference
  tempL=((long)temp*1024)/(tft.height()-20);
  TS_MINY=p1.y-( (tempL*10)>>10);// 10 pixels du bord
  TS_MAXY=TS_MINY+( (tempL*tft.height())>>10);
  /*
// For debug, show results
  tft.setCursor(5, 30);
  tft.println("After calibration: ");
  tft.print("TS_MINX= ");tft.println(TS_MINX);
  tft.print("TS_MAXX= ");tft.println(TS_MAXX);
  tft.print("TS_MINY= ");tft.println(TS_MINY);
  tft.print("TS_MAXY= ");tft.println(TS_MAXY);
  p1.x = map(p1.x, TS_MAXX,TS_MINX, tft.width(), 0);
  p1.y = map(p1.y, TS_MAXY,TS_MINY, tft.height(), 0);
  p2.x = map(p2.x, TS_MAXX,TS_MINX, tft.width(), 0);
  p2.y = map(p2.y, TS_MAXY,TS_MINY, tft.height(), 0);
  tft.println("Last touched points: ");
  tft.print("Pt 1: ");tft.print(p1.x);tft.print(" : ");tft.println(p1.y);
  tft.print("Pt 2: ");tft.print(p2.x);tft.print(" : ");tft.println(p2.y);
  // wait 1 more touch to exit finction
  do {  p2= ts.getPoint(); }while((p2.z < MINPRESSURE )|| (p2.z > MAXPRESSURE));
  pinMode(XM, OUTPUT);    pinMode(YP, OUTPUT);
*/
}



Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: berni_ on Jun 27, 2014, 10:26 pm
Again something new with these low cost displays...
After the success with the first display, I have ordered 5 more on Aliexpress (26$ for the lot), and surprise, there is differences.
The first differene is that the first one is working well with Adafruit and UTFT (GEEK24 model selected). The 2nd is not working at all.
Below some pictures that shows differences and similarities. Same manufacturer mcufriend.com.
The not working display seems to have a different controler. It answer 7777 when adafruit library is checking the model.
On le left: the NOT WORKING display, on the right, the display is OK
Anyone has an idea?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Jun 28, 2014, 10:08 am

The first differene is that the first one is working well with Adafruit and UTFT (GEEK24 model selected). The 2nd is not working at all.


... We certainly cannot guess what you are using. Care to post all the required libraries you used? UTFT is a large library suited to several displays, micro-controllers and pinouts, even with the *right* model selected, there are different pinouts, plus we dont know if you are using an uno, a mega or anything in between.


Below some pictures that shows differences and similarities. Same manufacturer mcufriend.com.
The not working display seems to have a different controler. It answer 7777 when adafruit library is checking the model.
On le left: the NOT WORKING display, on the right, the display is OK


I have both and you are right the display is different, but it still complies with the ST778x command set as described on previous posts. As far as i know they are not supported by UTFT, however it may be that one of the LCD's has an extended command set, for example, some are known to be compatible with ILI9325. I have no idea what controller the GEEK24 model uses, this should be your first mystery to be solved - why are you using it and who told you it would be compatible?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Jun 30, 2014, 03:31 pm
Ive just ported these displays to a different platform and used the ILI9325 library as my reference.

In order to get both types to work with such library the following registers need to be changed on the ILI9325.cpp file:

Register 0x90 - Change Value to 0x0033
Register 0x02 - Change value to 0x0700

This should allow UTFT and similar libraries to be used with these displays
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: arduhckr on Jul 02, 2014, 06:15 am
For the TFTLCD from mcufried.com as sold on the cheap via various providers, attached is a complete working sketch with drivers and examples:
- TFTLCD using st7783 driver
- resistive touchscreen
- SD, including images to be stored on micro-SD card
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Jul 05, 2014, 09:07 pm

For the TFTLCD from mcufried.com as sold on the cheap via various providers, attached is a complete working sketch with drivers and examples:
- TFTLCD using st7783 driver
- resistive touchscreen
- SD, including images to be stored on micro-SD card


The actual driver was already posted on #13, but thanks for the contribuition
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: mikiray on Jul 07, 2014, 01:07 pm
Hello, I buyed the display mcufriend and I'm trying to make it work. I think it's an error on the example tftpaint on line 97: "Point p=..." should be "TSPoint p=..." ?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: mikiray on Jul 07, 2014, 07:23 pm
It works good! Sorry, after some try I noticed that there was 2 libraries called "TouchScreen" in my IDE. Thank you.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: berni_ on Jul 13, 2014, 06:05 pm
Thank you arduhckr, yout last post makes both displays working!
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: magnetman on Jul 14, 2014, 06:34 pm
From my understanding after a test of the sd card part of this board the logic of the sdcard is 3.3V, so should not work without "Bi-Directional Level Shifter / Logic Level Converter". Has any of you guys made it work on 5V arduino?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Jul 14, 2014, 10:46 pm

From my understanding after a test of the sd card part of this board the logic of the sdcard is 3.3V, so should not work without "Bi-Directional Level Shifter / Logic Level Converter". Has any of you guys made it work on 5V arduino?


The board feeds the SD with 5V signals and 3.3V power, so you need an SD card with 5V tolerant pins. Most are, but do check.
I can confirm the reader on this shield does work.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: paulftw on Jul 22, 2014, 09:46 am
I have (what appears to be) exactly same board.
Drawing example works but there are weird rainbow stripes across the screen.
Anyone knows how to fix this, or at least where to look for a bad connection/short?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Jul 22, 2014, 07:24 pm

Anyone knows how to fix this...?


Post #14.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: paulftw on Jul 23, 2014, 03:30 am

Post #14.


Thanks casemod, you are awesome.
For anyone in the same boat as me - I was using a buggy version of TFTLCD. Haven't tried the sketch linked to in Reply #14, but half way through this tread someone attached their sketch a file named st7783.zip.

I've fixed a couple of compile time errors by removing glcdfont.c and usage of it in drawChar. It now works great.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: stez90 on Aug 01, 2014, 09:02 pm
Hi guys!
I also have the same board (advertised for spdf5408 controller).
I got it (quite) working with UTFT and with TFTLCD, but there is an error in how pixel are drawed.
Looks like it shifts of some pixel every some lines while drawing..
Check the image.
Any advice?

Stefano
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Aug 01, 2014, 09:35 pm

Any advice?


Best advice is to read the Thread!! Have you seen post #14?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: stez90 on Aug 01, 2014, 10:11 pm
Yes I have! I tried almost all of the attached libraries/sketch..
I also tried the code snippet from misc.ws and my display says "Unknown driver chip 7783".
Maybe my TFT is damaged, it shows  banding (lots of, not very visible in attached images)..  :(
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Aug 01, 2014, 10:32 pm

Yes I have! I tried almost all of the attached libraries/sketch..

And those are? And forget UFTF, unless you modify the library yourself.

I also tried the code snippet from misc.ws and my display says "Unknown driver chip 7783".

Thats what the controller is, as mentioned on post #11. I dont know why the chinese guys keep mentioning the other controller... But for the price is the best display you'll get your hands on, so worth the hassle.

Maybe my TFT is damaged, it shows  banding (lots of, not very visible in attached images)..  :(

Seems very heathy to me. One of the initialization commands is wrong tough. I find it hard that the libraries for the ST778x are not working. Try the link on post #13 and report. What IDE version are you using?

Did you install the "ADAFRUIT_GFX" library?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: stez90 on Aug 01, 2014, 10:48 pm
It was the Adafruit Gfx the problem. But before it gives me no error when compiling, and i didn't find any reference to it in the thread.. :~
Now I have problem with the touch, but that is another story :) .. Seems like that Adafruit renamed Point function to TSPoint.. I'll try to modify something..

Anyway Thank you!
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: stez90 on Aug 01, 2014, 11:00 pm
Sorted it out... I left installed the Adafruit library, but "st7783" has it integrated... Conflicts all around  :smiley-red:
Removed the Adafruit one and everything works like a charm..
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Aug 01, 2014, 11:09 pm

Sorted it out... I left installed the Adafruit library, but "st7783" has it integrated... Conflicts all around  :smiley-red:
Removed the Adafruit one and everything works like a charm..


Great. So you basically had the same library installed twice most likelly with different versions.
In the end which version have you used?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: stez90 on Aug 01, 2014, 11:21 pm
The st7783. I removed all other libraries.
All with 1.0.5 IDE.
With 1.5.7 beta it gives
Code: [Select]
Arduino:1.5.7 (Windows 7), Scheda:"Arduino Duemilanove or Diecimila, ATmega328"

C:\Users\Stez\Documents\Arduino\libraries\st7783\glcdfont.c:9:23: error: variable 'font' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
static unsigned char  font[] PROGMEM = {
                       ^

  Questo report potrebbe essere più ricco
di informazioni con
  "Mostra un output dettagliato durante la compilazione"
  abilitato in "File > Impostazioni"


Not a problem for me, since it works with 1.0.5  8) but i point it out if someone else has troubles.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: stez90 on Aug 03, 2014, 05:46 pm
Is there a way to use Adafruit GFX functions instead of the one included in st7783? Need a way to use text with background option... St7783 has not that function, so i have to hide the old value that i want to overwrite manually.
GFX has also other useful functions..
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Aug 03, 2014, 06:59 pm

St7783 has not that function, so i have to hide the old value that i want to overwrite manually.


Could this be what you're looking for?

do something (ST7735_something colour, ST7735_background color);

Code: [Select]

tft.setTextColor(ST7735_YELLOW, ST7735_BLACK);
tft.setTextSize(2);
tft.println("Hello World!");
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: stez90 on Aug 03, 2014, 10:58 pm
Wait. I was using the library attached to post #23, wich is different from the one attached to #13.
The #13 is better and faster. And has the required function.

The problem is that #13 has no touchscreen bundled in, so you have to add the adafruit one.

Too much info in a single thread XD

So, as recap:

USE THE LIBRARY FROM POST #13 (http://www.smokeandwires.co.nz/blog/a-2-4-tft-touchscreen-shield-for-arduino/)
USE ADAFRUIT_GFX (https://github.com/adafruit/Adafruit-GFX-Library)
USE ADAFRUIT TOUCHSCREEN (https://github.com/adafruit/Touch-Screen-Library)

BUT

about "tftpaint" example:
Don't know why, but the touch library bundled with st7783 (#23) works better than the adafruit one. The adafruit works good in the lower left corner of the screen, but lacks of speed in the other places and is completely orrible in the top right corner. The st7783 one is way better over all the screen. Unfortunately they are non compatible each other (Adafruit one is upgraded and some functions have different names).

So if you need a good touch then ADAFRUIT_GFX + st7783 (#23) is the way to go. And remember to remove adafruit touchscreen or it won't work.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: bricofoy on Aug 04, 2014, 06:51 pm
MANY thanks to all contributors to this post !!! I'm searching how to get this display to work since 3 months, with no luck... And i just read that last post, erase all the crappy libraries I had, install those on the 3 links and... it work like a charm :) :)

so, again THANK YOU !
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Aug 19, 2014, 02:21 am

It's the hardware peripheral available on MEGA2560 micros, called "external memory interface". The WR, RD, ALE pins  are manages automatically, no need to set/clear these pins by program. It is designed for connecting more SRAM directly to the uC.
In the code, display memory is then addresses with pointers, exactly the same way as internal RAM. I have used that a long time ago to interface displays with 8051 micros; it should work here also.

Anyway, by using the latest Adafruit library, it is faster than before (~2x).


I'm looking at this just now (complete failure getting the code to run on a due!!)
Did you managed to check anything related to the subject?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: McAndrew on Aug 21, 2014, 07:51 pm
Hi,
I have that tft from a few days ago and am having problems with it ...
When the coupling to the Arduino UNO, lights (all normal), but when I go to load the sample program "paint" or any of them, it shows nothing, it just stays lit.
I tried the "touchscreen" and "Paint" program and open the ternimal coordinates and shows me when I play, but as I say, nothing appears ...
I tried to delete all the libraries and leave only those taxes to use, so there were no problems with duplicate libraries, but does not work.
Do you guys have any idea ?.
Thank you.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Aug 21, 2014, 09:05 pm

Hi,
I have that tft from a few days ago and am having problems with it ...
When the coupling to the Arduino UNO, lights (all normal), but when I go to load the sample program "paint" or any of them, it shows nothing, it just stays lit.
I tried the "touchscreen" and "Paint" program and open the ternimal coordinates and shows me when I play, but as I say, nothing appears ...
I tried to delete all the libraries and leave only those taxes to use, so there were no problems with duplicate libraries, but does not work.
Do you guys have any idea ?.
Thank you.



Post a photo.

I have 3 and one is problematic (different controller) so this could be the case.
What does the program report as the controller trough the serial port?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: McAndrew on Aug 22, 2014, 07:36 pm
ok,
Here is what appears on screen ...
(http://imagizer.imageshack.us/v2/150x100q90/661/dFNxqI.jpg) (http://imageshack.com/f/iddFNxqIj)

Here what appears with touchscreen
(http://imagizer.imageshack.us/v2/150x100q90/905/iGOr6v.jpg) (http://imageshack.com/f/p5iGOr6vj)

With Graphictest
(http://imagizer.imageshack.us/v2/150x100q90/745/cF9rAP.jpg) (http://imageshack.com/f/kpcF9rAPj)

I have seen that in the serial monitor, LCD Driver chip appears: 7777.
Can that be the problem that nothing appears in it?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Aug 22, 2014, 07:51 pm
That s the right identifier. S77xx Family.

Try the code attached below. Delete all the other libraries in use and report.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: McAndrew on Aug 22, 2014, 08:23 pm
Thanks for trying to help me, but still not working... :~
The software version is 1.0.5-r2
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Aug 22, 2014, 09:48 pm
Install a fresh 1.5 and try again. Use the version below, extract to a folder and run the arduino executable (You can simply delete the folder when you are having trouble with something and extract from the archive again).

http://downloads.arduino.cc/arduino-1.5.7-windows.zip (http://downloads.arduino.cc/arduino-1.5.7-windows.zip)



Technically it should work, if not maybe there is some sort of problem with the screen itself.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: McAndrew on Aug 23, 2014, 12:07 pm
Definitely does not work ...
I'll try to buy another screen tft and another arduino...

Now see this:

Arduino: 1.5.7 (Windows 7), Placa:"Arduino Uno"

C:\Users\Andres\Downloads\arduino-1.5.7\libraries\TFTLCD\glcdfont.c:9:23: error: variable 'font' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
static unsigned char  font[] PROGMEM = {

                     
I have to change something?

That TFT recommend me to buy?

Thank you.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Aug 23, 2014, 01:50 pm
Hum... Im getting that sort of errors myself on the new arduino. Try to download version 1.5.6 instead. Less buggy.

I quite like that particular TFT to be fair, Shame it didn't work out for you

Whatever you buy don't get anything with the ILI9327 Controller in 8 bit mode. I am yet to find a suitable library.

ILI9320, ILI9325, SSD1289 are all good candidates, just be aware that the chinese guys often mislabel them. I would be aware buying anything that says mcufriend.com - These displays are mostly sold with the wrong model and the seller wont be able to help you. This was an issue with this red TFTs a while ago.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: bricofoy on Aug 23, 2014, 02:07 pm
to solve this particular issue, just add the "const" keyword to the function definition in glcdfont.c

you will got something like const uint_8 font[]=.......
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: McAndrew on Aug 23, 2014, 03:47 pm
It is the first time I work with the arduino platform and still do not understand very well ... How do I do that?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Aug 23, 2014, 04:01 pm

It is the first time I work with the arduino platform and still do not understand very well ... How do I do that?


How do you do what?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: McAndrew on Aug 23, 2014, 05:32 pm
this...


to solve this particular issue, just add the "const" keyword to the function definition in glcdfont.c

you will got something like const uint_8 font[]=.......

Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Aug 23, 2014, 06:14 pm

this...


to solve this particular issue, just add the "const" keyword to the function definition in glcdfont.c

you will got something like const uint_8 font[]=.......




You should have a field named "uint_8 font[]=....... "and you add the word const to it:" const uint_8 font[]=......."

I haven't used that particular one, so I am sure  bricofoy can clarify if you still dont find it.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: bricofoy on Aug 24, 2014, 10:47 am
yes. the problem with 1.5 is they've changed some compilation option (or compiler version, I don't know) wich now causes the error above, and stops compiling. So as the error messages explain, the font[] variable must be declared as "cosnt", so the workaround is quite simple : go to the library folder, open the file named in the error message, and change the font declaration to meet the requirement.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Lundin on Oct 18, 2014, 11:19 pm
Hello.
I purchased 5 of these displays a few days ago ( labeled www.mcufriend.com) of which 1x display works perfectly with the driver ts7783 fond in this thread, but 4 x displays just shows garbled pixels ( which i think is what McAndrew got.. the differenc with my LCD's is that the serial output says " LCD test! Unknown driver, ID=0.."

Is there a way to manually locate ins software or physically on the hardware) which driver the LCD is using or is the driver the actual LCD?

Here's what my TFT looks like..
(http://www.fatburen.org/doubblesixx/Arduino/2.4inch_TFTLCD_Error1b_400px.jpg)

Thanks for any info
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: jstarcher on Oct 19, 2014, 08:02 am
I just got a TFT that didn't work "out of the box" for me either.

Here is something you can try:

Code: [Select]
uint16_t Adafruit_TFTLCD::readID(void) {,[/li]
[li]Add these right after that line:[/li][/list]
Code: [Select]
//return 0x9325;
//return 0x9328;
//return 0x9341;
//return 0x8357;
//return 0x7575;

[/li]
[li]Starting at the BOTTOM, uncomment the lines one by one and test, see if any of them work.[/li]
[li]If none of them work, re-comment all the lines then edit the .h file and comment (or uncomment) the line
Code: [Select]
//#define USE_ADAFRUIT_SHIELD_PINOUT 1

Took a while, but it worked for me.

As it turned out, even though my board was a shield, I had to configure the code to work as breakout.

After that it I had to experiment a bit more with the pins to get the touch screen working.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: casemod on Oct 19, 2014, 03:39 pm
If it doesn't detect the driver don't fear. It may still be a 778x, but it is not being initialized, because the software has no idea what it is.

Code: [Select]

void setup()
{
  Serial.begin(9600);

  tft.reset();

  uint16_t identifier = tft.readID();

 
    Serial.print(F("Found LCD driver chip ID: "));
    Serial.println(identifier, HEX);
   
  tft.begin(identifier);


As you see the software reads the initializer and throws it on the init.

If there is no ID being read replace the above with:

Code: [Select]

void setup()
{
  Serial.begin(9600);

  tft.reset();
  tft.begin(0x9325);



The 0x9325 is a guess. Thats the only thing I have in my library, which you are likelly to be using. If not try one at the time as mentioned by  jstarcher:

Code: [Select]


0x9325;
0x9328;
0x9341;
0x8357;
0x7575;


There's no need to edit the .cpp. All is done within the sketch.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Lundin on Oct 21, 2014, 08:38 pm
Thank you both
Ah.. i tried so many different software packages i found and got sent to me a couple of different one's from the seller but i see now that the Adafruit one has all these other options.. and the 0X9341 saved the day for those that didn't work..  This is platinum quality help guys!

..and i think this should be excellent info in a sticky.. saves a ton of time and a bucket of headache figuring out.

Karma up to both of you!
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: rmohan10 on Oct 26, 2014, 05:13 am
Anybody has a working code for 2.8" arduino tft shield from www.mcufriend.com?

Pls help.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: stez90 on Nov 10, 2014, 05:03 pm
Anyone got one of those 2.4" ST7783 displays working with Arduino Due?
Using the libraries from previous post (with Mega pinout since they are the same) gives only pages of errors...

SWTFT+Adafruit GFX

Code: [Select]
Arduino:1.5.8 (Windows 7), Scheda:"Arduino Due (Programming Port)"

C:\Users\Stez\Documents\Arduino\libraries\SWTFT\mega_24_shield.h:89:18: note: in expansion of macro 'write8inline'
   #define write8 write8inline
                  ^
C:\Users\Stez\Documents\Arduino\libraries\SWTFT\SWTFT.cpp:621:2: note: in expansion of macro 'write8'
  write8(lb);
  ^
In file included from C:\Users\Stez\Documents\Arduino\libraries\SWTFT\SWTFT.cpp:15:0:
C:\Users\Stez\Documents\Arduino\libraries\SWTFT\mega_24_shield.h:63:5: error: 'PORTE' was not declared in this scope
     PORTE = (PORTE & B11001111) | ((d << 2) & B00110000); \
     ^
C:\Users\Stez\Documents\Arduino\libraries\SWTFT\mega_24_shield.h:89:18: note: in expansion of macro 'write8inline'
   #define write8 write8inline
                  ^
C:\Users\Stez\Documents\Arduino\libraries\SWTFT\SWTFT.cpp:622:2: note: in expansion of macro 'write8'
  write8(lb);
  ^
C:\Users\Stez\Documents\Arduino\libraries\SWTFT\mega_24_shield.h:65:2: error: 'PORTG' was not declared in this scope
  PORTG = (PORTG & B11011111) | ((d << 1) & B00100000); \
  ^
C:\Users\Stez\Documents\Arduino\libraries\SWTFT\mega_24_shield.h:89:18: note: in expansion of macro 'write8inline'
   #define write8 write8inline
                  ^
C:\Users\Stez\Documents\Arduino\libraries\SWTFT\SWTFT.cpp:622:2: note: in expansion of macro 'write8'
  write8(lb);
  ^
C:\Users\Stez\Documents\Arduino\libraries\SWTFT\mega_24_shield.h:66:2: error: 'PORTH' was not declared in this scope
  PORTH = (PORTH & B11100111) | ((d >> 3) & B00011000); \

And so on, trimmed due to max lenght exceeded..
 
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: aguther on Nov 17, 2014, 01:00 am
Hello.

  Also I purchased one 2.4 inch TFT touch screen supporting ( For UNO R3 ) labeled www.mcufriend.com and I try to put in function, but no good results just shows garbled pixels.
 Thanks in advence for any info.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Lundin on Nov 17, 2014, 04:38 pm
@stez90: It looks like the sketch is trying to declare something that the libraries can't resolve.... i tried to convert a similar project from the MEGA to the DUE and ran into sh#tload of errors because of incompatible libraries and different voltages... so i took another path.

Which sketch are you running?


@Aguther: All information you need to know should be found is in this thread.. the ts7787 driver worked for one of my TFT's but the other 4 needed a tweak in the ADAfruit.cpp setting the driver manually to x9341  to work properly as they all had the "unknown driver" error.

If it doesn't work with the x9341 you just have to try the next one and so on until you find which it is.

It also may work with the advice from casemod but i only tried jstarchers so i guess you'll have to find this out by yourself.

@rmohan10: The ADAfruit one's should be able to run the 2.8".. look at their pages to find the latest files.
Good luck
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Lundin on Nov 17, 2014, 05:03 pm
Just for the sake of trying to help and knowing what headache i had trying to figure this out, here's some icecream for you:

Download the latest ADAfruit libraries and add them to where your userlibrary is located (mine is at: C:\Users\QUAD ONE\Documents\Arduino\libraries).

Load up the GraphicsTest.ino that comes with this library

In the GraphicsTest.ino, change the line:
Code: [Select]

uint16_t identifier = tft.readID();

to
Code: [Select]

uint16_t identifier = 0x9341;

This way you "hardcode" what driver should be used as it can't resolve this on it's own

If this doesn't work you can try to substitute with the other possibie types:

0x9325;
0x9328;
0x9341;
0x8357;
0x7575;

Good luck (again)

 
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: aguther on Nov 19, 2014, 07:52 pm
hello,

I have not succeeded yet, but I hope to find help to find the working solution and this garbled pixels to disappear and the shield is operate.

I try all this types:
0x9325;
0x9328;
0x9341;
0x8357;
0x7575;

without succes.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: hunter2379 on Dec 02, 2014, 07:28 am
Hello. I saw that a few people had solved their issues with their touch screens. I purchased one of these (http://www.ebay.com/itm/261646880116?_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT) a few days ago and its still on the way. But as I was looking up how to get it to work I came across this post. Did anyone figure out this specific model? Any help would be greatly appreciated as I am still a newby.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Lundin on Dec 10, 2014, 03:50 pm
hello,

I have not succeeded yet, but I hope to find help to find the working solution and this garbled pixels to disappear and the shield is operate.

I try all this types:
0x9325;
0x9328;
0x9341;
0x8357;
0x7575;

without succes.
Have you installed the latest Ada fruit libraries?

Also note that if you have more than 1 library of the same type Arduino might choose what it finds and therefor the problem might persist.

Try to remove or delete any older Adafruit libraries and install them again. Also check that you don't have put libraries both in the Userfolder and the Arduinofolder..( the folder where Arduino is installed) then it won't work as Arduino picks whatever it finds..

The descriptions in this thread should with 99% certainty work for you if you have all libraries installed correctly.

Good luck
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Lundin on Dec 10, 2014, 03:59 pm
Hello. I saw that a few people had solved their issues with their touch screens. I purchased one of these (http://www.ebay.com/itm/261646880116?_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT) a few days ago and its still on the way. But as I was looking up how to get it to work I came across this post. Did anyone figure out this specific model? Any help would be greatly appreciated as I am still a newby.
The Adafruit library is said to work up to the 2,8" as well
It seems MCUfriend uses random drivers for their different LCD's and if you can't read it on the cirquits directly it could be a little trial and error to find out, but read through posts here ( in this thread) i'm pretty sure you'll get it running in notime.
Post back here otherwise and i'm sure somebody willl be able to help out.

Cheers
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Vaupell on Dec 17, 2014, 05:12 pm
Anyone got one of those 2.4" ST7783 displays working with Arduino Due?
Using the libraries from previous post (with Mega pinout since they are the same) gives only pages of errors...

SWTFT+Adafruit GFX

Yep i got it working with the code from smoke and wirers..  the SWIFT library..
http://www.smokeandwires.co.nz/blog/a-2-4-tft-touchscreen-shield-for-arduino/

(http://i.imgur.com/ZTRRHFy.jpg)

Even moved it to a breakout and did a Osccilliscope.

(http://i.imgur.com/8CnG7yZ.jpg)


However the touch is shit, when you touch in the drawing example, everything is mirrored
both horizontal and vertical, so pushing top right actually draws button left..

Well i'm not using the touch anyway.

Another problem, this is  ONLY working on Arduino UNO boards,
I tryed
- Leonardo, nano, mini pro and mega
neither works

Only works on both Original Uno's and a few china Uno's ive testet on.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: stez90 on Dec 17, 2014, 06:06 pm
Thanks but it doesn't look like an Arduino Due (32bit ARM microprocessor).. I got it working on Uno and Mega, but not on Due..
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: SujanW on Dec 18, 2014, 08:27 am
Hello.

  Also I purchased one 2.4 inch TFT touch screen supporting ( For UNO R3 ) labeled www.mcufriend.com and I try to put in function, but no good results just shows garbled pixels.
 Thanks in advence for any info.
Friends,

I also have the same issue as aguther and i tried all your advices so far but non of them worked. From www.mcufriend.com site i found out that the control IC is ST7781 and from below address i found the specific library for the IC.
https://github.com/yamsam/TFTLCD_ST7781
yet i get this garbled pixals.

If someone can help me it would be great.
I spent this whole week trying to figure out this ?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Lundin on Dec 18, 2014, 11:52 pm
Friends,

I also have the same issue as aguther and i tried all your advices so far but non of them worked. From www.mcufriend.com site i found out that the control IC is ST7781 and from below address i found the specific library for the IC.
https://github.com/yamsam/TFTLCD_ST7781
yet i get this garbled pixals.

If someone can help me it would be great.
I spent this whole week trying to figure out this ?
Download the ST7781 found earlier in this thread.. it worked for one of my LCD's.. i'd suggest that you also open the serial monitor when running the code to see that it actually find the driver and that it - IS - the ST7781

It may well be that it isn't that driver even if it should.. the garbled pixels makes this somewhat obvious it's still a problem with the driver, or that Arduino couldn't make this out by running the code. I have tried so many drivers and libraries out there but what did the trick was to install the latest ADAfruit libraries and - manually - set the driver in the "Graphicstest.ino" sketch that comes with the libraries.

If you load and run the sketch and open the Serial monitor window and see what it gives for an answer when running the code.. If the serial monitor says " Unknown driver" when running the code.. then it's not ST7781...or it couldn't discern it.. in this case try to set this manually and you may as well have a winner


Also: If it is the ST7781, and you have set it manually,  but still doesn't work, make sure you have the latest libraries and no doubles of any library. It might be you installed a new library but Arduino still picks the old one.. No doubles - No troubles

Otherwise: Set up the sketch as you normally would before running it and post it here. It's way easier to help by seeing how the code is set up.. maybe there's something you'ver overlooked by trying over and over..

Cheers
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: SujanW on Dec 19, 2014, 06:43 am
Lundin Thanks a lot for the advice mate.

I may be getting somewhere but I don't know if it is the right direction.
As you said I cleaned the library and kept only Adafruit libraries and ran Graphicstest.ino.
Bingo it says "unknown lcd driver chip c0c"
however going further with your advice I hardcoded all 5 types of drivers but yet no success.

It makes me wonder could there be another driver IC which we may have missed.
your thoughts are greatly appreciated.

Thanks in advance.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Lundin on Dec 20, 2014, 09:33 pm
Can you perhaps put up the little snippet of code to show how you made the changes? It seems fairly strange that none of them worked..
...but ofcourse.. mcufriend may have gone with a totally different driver.. nothing suprises me anymore regarding imported stuff..it's like russian roulette sometimes :)

It was the ST7783 (http://forum.arduino.cc/index.php?action=dlattach;topic=223769.0;attach=87237) i meant, not the ST7781
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: mcapurso on Jan 02, 2015, 07:49 pm
I bought a shield on ebay that has the text "aitendo UL024TF ILI9325"
It has a 2.4 TFTLCD , a touch screen and a SD reader with the following pins

Pins on the shield   Pin Arduino UNO

LCD_RST   A4
LCD_CS   A3
LCD_RS   A2
LCD_WR   A1
LCD_RD   A0

LCD_D2   D2
LCD_D3   D3
LCD_D4   D4
LCD_D5   D5
LCD_D6   D6
LCD_D7   D7

LCD_D0   D8
LCD_D1   D9

SD_SS   D10
SD_DI   D11
SD_DO   D12
SD_SCK   D13

Tested library TouchScreen from ladyada (AdaFruit) Touch-Screen-Library-master.zip

https://github.com/adafruit/Touch-Screen-Library

using example touchscreendemoshield
Pin used follow...

// These are the pins for the shield!
#define YP A1  // must be an analog pin, use "An" notation!
#define XM A2  // must be an analog pin, use "An" notation!
#define YM 7   // can be a digital pin
#define XP 6   // can be a digital pin

Tested library SD from ladyada  AdaFruit  https://github.com/adafruit/SD
using example SD_listfiles  with  CS set to 10
Pin used follow...

* SD card attached to SPI bus as follows:
 ** MOSI - pin 11
 ** MISO - pin 12
 ** CLK - pin 13
 ** CS - pin 10

For TFTLCD , used Adafruit TFTLCD-Library-master.zip from
https://github.com/adafruit/TFTLCD-Library
and Adafruit-GFX-Library-master.zip from
https://github.com/adafruit/Adafruit-GFX-Library

VERY IMPORTANT: THE PINOUT FOLLOWS THE adafruit 2.8" TFT Breakout Board Pinout
Therefore, before compiling, please go to Adafruit_TFTLCD.h in the libraries directory
and be sure to have commented the line that follows

// **** IF USING THE LCD BREAKOUT BOARD, COMMENT OUT THIS NEXT LINE. ****
// **** IF USING THE LCD SHIELD, LEAVE THE LINE ENABLED:             ****

//#define USE_ADAFRUIT_SHIELD_PINOUT 1

To test the shield please use the graphicstest example with some modifications,
considering that the chip in the aitendo shield has TWO VERY IMPORTANT
ISSUES:
1 - Answers 0 HEX to the request to identify the chip.
uint16_t identifier = tft.readID();
2 - The chip is a 9341 

Therefore, you have to change the first 85 lines , those preceding
tft.begin(identifier);
to what follows:

// IMPORTANT: Adafruit_TFTLCD LIBRARY MUST BE SPECIFICALLY
// CONFIGURED FOR EITHER THE TFT SHIELD OR THE BREAKOUT BOARD.
// SEE RELEVANT COMMENTS IN Adafruit_TFTLCD.h FOR SETUP.

#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_TFTLCD.h> // Hardware-specific library

// The control pins for the LCD can be assigned to any digital or
// analog pins...but we'll use the analog pins as this allows us to
// double up the pins with the touch screen (see the TFT paint example).
#define LCD_CS A3 //
#define LCD_CD A2 //
#define LCD_WR A1 //
#define LCD_RD A0 //
#define LCD_RESET A4 //

// When using the BREAKOUT BOARD only, use these 8 data lines to the LCD:
// For the Arduino Uno, Duemilanove, Diecimila, etc.:
//   D0 connects to digital pin 8  (Notice these are
//   D1 connects to digital pin 9   NOT in order!)
//   D2 connects to digital pin 2
//   D3 connects to digital pin 3
//   D4 connects to digital pin 4
//   D5 connects to digital pin 5
//   D6 connects to digital pin 6
//   D7 connects to digital pin 7
// For the Arduino Mega, use digital pins 22 through 29
// (on the 2-row header at the end of the board).

// Assign human-readable names to some common 16-bit color values:
#define   BLACK   0x0000
#define   BLUE    0x001F
#define   RED     0xF800
#define   GREEN   0x07E0
#define CYAN    0x07FF
#define MAGENTA 0xF81F
#define YELLOW  0xFFE0
#define WHITE   0xFFFF

Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);
// If using the shield, all control and data lines are fixed, and
// a simpler declaration can optionally be used:
// Adafruit_TFTLCD tft;

void setup(void) {
  Serial.begin(9600);
  Serial.println(F("TFT LCD test"));

#ifdef USE_ADAFRUIT_SHIELD_PINOUT
  Serial.println(F("Using Adafruit 2.8\" TFT Arduino Shield Pinout"));
#else
  Serial.println(F("Using Adafruit 2.8\" TFT Breakout Board Pinout"));
#endif

  Serial.print("TFT size is "); Serial.print(tft.width()); Serial.print("x"); Serial.println(tft.height());

  tft.reset();

  uint16_t identifier = tft.readID();

  if(identifier == 0x9325) {
    Serial.println(F("Found ILI9325 LCD driver"));
  } else if(identifier == 0x9328) {
    Serial.println(F("Found ILI9328 LCD driver"));
  } else if(identifier == 0x7575) {
    Serial.println(F("Found HX8347G LCD driver"));
  } else if(identifier == 0x9341) {
    Serial.println(F("Found ILI9341 LCD driver"));
  } else if(identifier == 0x8357) {
    Serial.println(F("Found HX8357D LCD driver"));
  } else {
    Serial.print(F("Unknown LCD driver chip: "));
    Serial.println(identifier, HEX);
    Serial.println(F("If using the Adafruit 2.8\" TFT Arduino shield, the line:"));
    Serial.println(F("  #define USE_ADAFRUIT_SHIELD_PINOUT"));
    Serial.println(F("should appear in the library header (Adafruit_TFT.h)."));
    Serial.println(F("If using the breakout board, it should NOT be #defined!"));
    Serial.println(F("Also if using the breakout, double-check that all wiring"));
    Serial.println(F("matches the tutorial."));
    // return;
  }

  //tft.begin(identifier);
  tft.begin(0x9341);

...

IT WORKS ! SOLVED
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: mcapurso on Jan 02, 2015, 07:50 pm
I bought a shield on ebay that has the text "aitendo UL024TF ILI9325"
It has a 2.4 TFTLCD , a touch screen and a SD reader with the following pins

Pins on the shield   Pin Arduino UNO

LCD_RST   A4
LCD_CS   A3
LCD_RS   A2
LCD_WR   A1
LCD_RD   A0

LCD_D2   D2
LCD_D3   D3
LCD_D4   D4
LCD_D5   D5
LCD_D6   D6
LCD_D7   D7

LCD_D0   D8
LCD_D1   D9

SD_SS   D10
SD_DI   D11
SD_DO   D12
SD_SCK   D13

Tested library TouchScreen from ladyada (AdaFruit) Touch-Screen-Library-master.zip

https://github.com/adafruit/Touch-Screen-Library

using example touchscreendemoshield
Pin used follow...

// These are the pins for the shield!
#define YP A1  // must be an analog pin, use "An" notation!
#define XM A2  // must be an analog pin, use "An" notation!
#define YM 7   // can be a digital pin
#define XP 6   // can be a digital pin

Tested library SD from ladyada  AdaFruit  https://github.com/adafruit/SD
using example SD_listfiles  with  CS set to 10
Pin used follow...

* SD card attached to SPI bus as follows:
 ** MOSI - pin 11
 ** MISO - pin 12
 ** CLK - pin 13
 ** CS - pin 10

For TFTLCD , used Adafruit TFTLCD-Library-master.zip from
https://github.com/adafruit/TFTLCD-Library
and Adafruit-GFX-Library-master.zip from
https://github.com/adafruit/Adafruit-GFX-Library

VERY IMPORTANT: THE PINOUT FOLLOWS THE adafruit 2.8" TFT Breakout Board Pinout
Therefore, before compiling, please go to Adafruit_TFTLCD.h in the libraries directory
and be sure to have commented the line that follows

// **** IF USING THE LCD BREAKOUT BOARD, COMMENT OUT THIS NEXT LINE. ****
// **** IF USING THE LCD SHIELD, LEAVE THE LINE ENABLED:             ****

//#define USE_ADAFRUIT_SHIELD_PINOUT 1

To test the shield please use the graphicstest example with some modifications,
considering that the chip in the aitendo shield has TWO VERY IMPORTANT
ISSUES:
1 - Answers 0 HEX to the request to identify the chip.
uint16_t identifier = tft.readID();
2 - The chip is a 9341 

Therefore, you have to change the first 85 lines , those preceding
tft.begin(identifier);
to what follows:

// IMPORTANT: Adafruit_TFTLCD LIBRARY MUST BE SPECIFICALLY
// CONFIGURED FOR EITHER THE TFT SHIELD OR THE BREAKOUT BOARD.
// SEE RELEVANT COMMENTS IN Adafruit_TFTLCD.h FOR SETUP.

#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_TFTLCD.h> // Hardware-specific library

// The control pins for the LCD can be assigned to any digital or
// analog pins...but we'll use the analog pins as this allows us to
// double up the pins with the touch screen (see the TFT paint example).
#define LCD_CS A3 //
#define LCD_CD A2 //
#define LCD_WR A1 //
#define LCD_RD A0 //
#define LCD_RESET A4 //

// When using the BREAKOUT BOARD only, use these 8 data lines to the LCD:
// For the Arduino Uno, Duemilanove, Diecimila, etc.:
//   D0 connects to digital pin 8  (Notice these are
//   D1 connects to digital pin 9   NOT in order!)
//   D2 connects to digital pin 2
//   D3 connects to digital pin 3
//   D4 connects to digital pin 4
//   D5 connects to digital pin 5
//   D6 connects to digital pin 6
//   D7 connects to digital pin 7
// For the Arduino Mega, use digital pins 22 through 29
// (on the 2-row header at the end of the board).

// Assign human-readable names to some common 16-bit color values:
#define   BLACK   0x0000
#define   BLUE    0x001F
#define   RED     0xF800
#define   GREEN   0x07E0
#define CYAN    0x07FF
#define MAGENTA 0xF81F
#define YELLOW  0xFFE0
#define WHITE   0xFFFF

Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);
// If using the shield, all control and data lines are fixed, and
// a simpler declaration can optionally be used:
// Adafruit_TFTLCD tft;

void setup(void) {
  Serial.begin(9600);
  Serial.println(F("TFT LCD test"));

#ifdef USE_ADAFRUIT_SHIELD_PINOUT
  Serial.println(F("Using Adafruit 2.8\" TFT Arduino Shield Pinout"));
#else
  Serial.println(F("Using Adafruit 2.8\" TFT Breakout Board Pinout"));
#endif

  Serial.print("TFT size is "); Serial.print(tft.width()); Serial.print("x"); Serial.println(tft.height());

  tft.reset();

  uint16_t identifier = tft.readID();

  if(identifier == 0x9325) {
    Serial.println(F("Found ILI9325 LCD driver"));
  } else if(identifier == 0x9328) {
    Serial.println(F("Found ILI9328 LCD driver"));
  } else if(identifier == 0x7575) {
    Serial.println(F("Found HX8347G LCD driver"));
  } else if(identifier == 0x9341) {
    Serial.println(F("Found ILI9341 LCD driver"));
  } else if(identifier == 0x8357) {
    Serial.println(F("Found HX8357D LCD driver"));
  } else {
    Serial.print(F("Unknown LCD driver chip: "));
    Serial.println(identifier, HEX);
    Serial.println(F("If using the Adafruit 2.8\" TFT Arduino shield, the line:"));
    Serial.println(F("  #define USE_ADAFRUIT_SHIELD_PINOUT"));
    Serial.println(F("should appear in the library header (Adafruit_TFT.h)."));
    Serial.println(F("If using the breakout board, it should NOT be #defined!"));
    Serial.println(F("Also if using the breakout, double-check that all wiring"));
    Serial.println(F("matches the tutorial."));
    // return;
  }

  //tft.begin(identifier);
  tft.begin(0x9341);

...

IT WORKS. SOLVED.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Lundin on Jan 10, 2015, 07:38 pm
Edit: Deleted post... have to revise my thinking before answering :)
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: xcellsior on Jan 12, 2015, 11:38 pm
I'm sure this question is a dup but I can't find the answer in the 6 pages of posting here:)  Anyway, I've found myself in the same boat as many having an LCD with a 7783 chip and no library.  Can someone point me to where I can find the libs for this display that will work on an UNO?  I've asked the manufacturer but I expect this will take 5 or 6 email before the light turns on.  Thanks in advance!
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: xcellsior on Jan 12, 2015, 11:51 pm
Found it. 
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: aguther on Jan 16, 2015, 09:18 pm
Hi,

Thank's for dias1973 for second test code on post #4, from http://forum.arduino.cc/index.php?topic=288425.0
also for me is work too on:
 - 3.5" LCD TFT for UNO R3 and also work on:
 - 2.4" LCD TFT for UNO R3

PS:
-this 2.4" LCD TFT for UNO R3 before this code just garbled pixels shows
reade posts #66 from:
 http://forum.arduino.cc/index.php?topic=223769.60
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: C_Bastler on Mar 21, 2015, 09:10 pm
Good Evening,

I recently got a similar set. 2.4 inch TFT LCD Shield. It almost looks like the others, also red board. On the back there are 3 chips. 2x HC245 (9H4T74) 1x AMS1117. I have downloaded from the Internet a library. Here it shows me my display is blank, but only scattered pixels. I use No SD card, and would like to use the Paint function ... Or that at least something can show.

But for hours with me doing nothing, as small colored pixels. "Pixel Cloud" the rest of the screen is white.

If someone uses the same shield, it would be great if you could help me. From best, if available. Library and example. Thank you.


Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: PHTVS on Mar 26, 2015, 09:19 pm
Good evening,

I have recently bought a el-cheapo (mcufriend) 2,8 inch tft touch screen on ebay.

After a couple of hours of reading and trying (and some cursing too  :D ) I finaly got the LCD a bit working.
Im using the ST7783 library as posted in this topic and I got some images on the screen.

But the problem is that there are a couple of white/rainbow lines on the left side of the screen.

(http://www.weerstation-lemmer.nl/lcd1.JPG)

(http://www.weerstation-lemmer.nl/lcd2.JPG)

The other problem is that when I use the tftpaint demo and I draw a line from left to right, the lcd is painting from right to left. So the screen is mirrored I gues.

Anyone have ideas to fix this problem, because Im out of options.


Thanks in advance!

Regards,
Theo

Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Lundin on Apr 03, 2015, 09:10 am
Good evening,

I have recently bought a el-cheapo (mcufriend) 2,8 inch tft touch screen on ebay.

After a couple of hours of reading and trying (and some cursing too  :D ) I finaly got the LCD a bit working.
Im using the ST7783 library as posted in this topic and I got some images on the screen.

But the problem is that there are a couple of white/rainbow lines on the left side of the screen.

(http://www.weerstation-lemmer.nl/lcd1.JPG)

(http://www.weerstation-lemmer.nl/lcd2.JPG)

The other problem is that when I use the tftpaint demo and I draw a line from left to right, the lcd is painting from right to left. So the screen is mirrored I gues.

Anyone have ideas to fix this problem, because Im out of options.


Thanks in advance!

Regards,
Theo


Hi.
My first shitty display adapter did this to my 3.5" touch LCD but later found that it was a cheapo clone.. bought a new - original adapter - and everything worked.. Your display problem though: can it be an offset issue?  that you need to correct some values in the library.. (Y-coordinates) I haven't investigated any further on this as i'm using UTFT from Henning Karlsen and haven't had the misfortune to do it myself.

- If - you're using Henning Karlsens display lib UTFT (http://www.rinkydinkelectronics.com/library.php?id=51) there's a calibration routine included which sets the coordinates for you.. ultimate niftyness.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: marc-duyn on Apr 06, 2015, 10:04 pm
I also have the mentioned mirror problem and i can not solve it.

by the way posting 61 of this thread did do the work for me to initialize the display

the shortcut in posting 62 did not work for me.

i only now have the problem that everything is mirrorred

marc
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Jeroi on Apr 06, 2015, 10:27 pm
Take o look of the library header, atleast TFTLCD library has invert x y obtion there to add.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Lalokiel on Apr 18, 2015, 04:24 pm
guys, i have this tft:
http://www.ebay.com/itm/360699426541?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

could you help me to identify it's chip driver? Clearly it's not ili9341 or ili9340.
Help me with the identifier code and pin definition pls.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: marc-duyn on Apr 20, 2015, 11:56 am
Hi Jeroi

What do you mean with your quote
"Take o look of the library header, atleast TFTLCD library has invert x y obtion there to add. "
can you give me an example for what to look for or what to add or what to change.

thanks

marc
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: dexter_lab on May 10, 2015, 02:44 pm
The board feeds the SD with 5V signals and 3.3V power, so you need an SD card with 5V tolerant pins. Most are, but do check.
I can confirm the reader on this shield does work.
To bring back subject to the table. I have this shield and I do not want to fry the SD card, how to understand it will survive 5v? the card is 4G transcend HC class 4?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: rowboteer on May 11, 2015, 01:13 pm
guys, i have this tft:
http://www.ebay.com/itm/360699426541?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

could you help me to identify it's chip driver? Clearly it's not ili9341 or ili9340.
Help me with the identifier code and pin definition pls.
You are off topic... you can start a new thread... but as you are a Newbie... the display looks identical to the one I have and that does have an ILI9341 driver.  You MUST use logic level converters without them it WILL NOT WORK even if your connections and software are correct.  Look here and try the setup for the 2.2" display. (http://www.instructables.com/id/Arduino-TFT-display-and-font-library/)

In future it would be a good idea to start a new thread!
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: rowboteer on May 11, 2015, 01:26 pm
To bring back subject to the table. I have this shield and I do not want to fry the SD card, how to understand it will survive 5v? the card is 4G transcend HC class 4?
There are quite a few pitfalls when using SD Cards:

1. 5V logic levels tends to blow them, so level converters are necessary (if not already fitted to the board)
2. Some are sensitive to logic rise and fall time speeds and do not work unless the edges are fast
3. Some are not compatible with the libraries for some reason I have never bothered to fathom!

Re. 1 and 2: You have 3 options:
a) Cheap one is to use a resistor divider, this is "frowned upon" by purists but does work if low value resistors are used, I have not had problems with 1K2 and 1K8 (see here (http://www.instructables.com/id/Arduino-TFT-display-of-bitmap-images-from-an-SD-Ca/)).  With these low values (circa 700 Ohms source impedance) rise fall times are typically 10 to 15ns
b) Use a xxx4050 buffer, these are a "better solution" but slew rate( rise and fall times) is typically about 8-12ns with a 3.3V supply so may be marginal
c) Use 74LCX245 chips, these give edge speeds of <3ns but you can then get "ringing" (decaying oscillations) on the edges if you do not use a proper PCB layout or use long "breadboard" wiring. Adding 22 to 33R series resistors at the output pin of the buffer will help kill off these inductive rings (which play havoc with edge critical signals like clocks and strobes).

Re: 3. Generally this is simply found out by trying a few different cards.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Skyser on May 16, 2015, 03:45 am
I also have the mentioned mirror problem and i can not solve it.

by the way posting 61 of this thread did do the work for me to initialize the display

the shortcut in posting 62 did not work for me.

i only now have the problem that everything is mirrorred

marc
There is a solution for those who have a problem with inverted touch-screen coordinates. In "tftpaint" sketch it can be easy resolved by changing these 4 strings:

#define YP A1  // must be an analog pin, use "An" notation!
#define XM A2  // must be an analog pin, use "An" notation!
#define YM 7   // can be a digital pin
#define XP 6   // can be a digital pin

to

#define YP A2 
#define XM A1 
#define YM 6   
#define XP 7   

it works on MEGA2560 with libraries Adafruit-GFX, SWTFT-Shield and Adafruit Touch-Screen
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: wshashisampath on May 19, 2015, 07:47 pm
hey i bought a 2.4 TFT Touch lcd on ebay.. but i cant see any chip set on the tft shield...  i searched in therent but i was unable to find one.. plz help

Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Skyser on May 21, 2015, 10:20 pm
hey i bought a 2.4 TFT Touch lcd on ebay.. but i cant see any chip set on the tft shield...  i searched in therent but i was unable to find one.. plz help
Install Adafruit-GFX and SWTFT-Shield libraries, use this sketch and open serial monitor, you'll see something like this:

TFT LCD test
LCD driver chip: 9325
Done!



#include <Adafruit_GFX.h>    // Core graphics library
#include <SWTFT.h> // Hardware-specific library


SWTFT tft;
int pause = 1000;


void setup(void) {
  Serial.begin(9600);
  Serial.println(F("TFT LCD test"));

  tft.reset();

  uint16_t identifier = tft.readID();

 
    Serial.print(F("LCD driver chip: "));
    Serial.println(identifier, HEX);
   

  tft.begin(identifier);

tft.fillScreen(BLACK);

  Serial.println(F("Done!"));
}

void loop(void) {
  tft.setRotation(0);
  tft.fillScreen(BLACK);
 
  tft.fillRect(0, 0, 100, 100, RED);
  delay(pause);

  tft.fillRoundRect(100, 100, 100, 200, 10, tft.color565(0, 255, 0));
  delay(pause);

  tft.fillTriangle(10, 10, 200, 200, 10, 200, tft.color565(0, 0, 255));
  delay(pause);

  tft.drawCircle(100, 100, 50, YELLOW);
  delay(pause);

  tft.drawLine(200, 0, 100, 100, WHITE);
  delay(pause);
 
}
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: MikeORC on May 24, 2015, 08:41 pm
I bought one of these from Banggood (Both unoR3 and 2.4"TFT) what a pain to get everything working....after a lot of reading forums and testing library's I finally got everything working, not bad for a first timer lol.

From what I gather there are a few different models of screen drivers, the one I have is ILI9341 8bit

So I used include files for the TFT screen;
Adafruit_GFX_AS.h
Adafruit_GFX.h
Adafruit_ILI9341_8bit_AS.h

For the Touch part I used;
"TouchScreen.h" From Touch-Screen-Library-Master demo

For the SD Card I used the Arduino SD library after changing the following to work with the screen;

#define LCD_CS A3 // Chip Select goes to Analog 3
#define LCD_CD A2 // Command/Data goes to Analog 2
#define LCD_WR A1 // LCD Write goes to Analog 1
#define LCD_RD A0 // LCD Read goes to Analog 0

#define LCD_RESET A4 // Can alternately just connect to Arduino's reset pin
#define SD_CS 10 // Card select for shield use

Adafruit_ILI9341_8bit_AS tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);

Mike C.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: minimanimo on May 27, 2015, 09:28 pm
There is a solution for those who have a problem with inverted touch-screen coordinates. In "tftpaint" sketch it can be easy resolved by changing these 4 strings:

#define YP A1  // must be an analog pin, use "An" notation!
#define XM A2  // must be an analog pin, use "An" notation!
#define YM 7   // can be a digital pin
#define XP 6   // can be a digital pin

to

#define YP A2 
#define XM A1 
#define YM 6   
#define XP 7   

it works on MEGA2560 with libraries Adafruit-GFX, SWTFT-Shield and Adafruit Touch-Screen

Hi,i've the same problem.
I have 2.4'' TFT display, MCUFRIEND (it had ILI9341 LCD driver) on Arduino Uno.
I've used this library,beacuse i have problem with the white screen,this: Library and videotutorial (http://www.moleandroid.com/arduino-tutorial-2-how-to-setup-mcufriend-2-4-lcd-tft-libraries-and-avoid-white-screen/)

I have tftpaint inverted touch-screen coordinates,but the change had no effect.
Can you help me?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Skyser on May 28, 2015, 03:57 am
Hi,i've the same problem.
I have 2.4'' TFT display, MCUFRIEND (it had ILI9341 LCD driver) on Arduino Uno.
I've used this library,beacuse i have problem with the white screen,this: Library and videotutorial (http://www.moleandroid.com/arduino-tutorial-2-how-to-setup-mcufriend-2-4-lcd-tft-libraries-and-avoid-white-screen/)

I have tftpaint inverted touch-screen coordinates,but the change had no effect.
Can you help me?
I had the same problem with these libraries.

I use other libraries, that works with my screen on UNO and MEGA 2560, try them:
https://drive.google.com/file/d/0B1nERAPmvurPRHoxaktxVXd1YlU
Title: ARDUINO UNO R3 AND DISPLAY TFT 2.4" FROM MCUFRIEND NOT WORKING
Post by: Walterone on Jun 05, 2015, 06:03 pm
DEAR all ,
I have bought an ARDUINO UNO  and a TFT display 2.4"  brand mcufriend.
please you can see the photos enclosed .
I have connected it to arduino  uno in correct mode but I am not able to get it working.
I have tried a lot of libraries but nothing .
I have tested the arduino uno itself and it works .
when I try to inser a schetch the result is enclosed in the photos ....
here below a part of program
I dont understand why LCD _CD   this pin is not present in TFT
thank you very much for all the help to get it working
Ciao
Walterone
( from MILAN )





#define LCD_CS A3   
#define LCD_CD A2   
#define LCD_WR A1   
#define LCD_RD A0   
// you can also just connect RESET to the arduino RESET pin
#define LCD_RESET A4
//Duemilanove/Diecimila/UNO/etc ('168 and '328 chips) microcontoller:
// Color definitions
#define   BLACK           0x0000
#define   BLUE            0x001F
#define   RED             0xF800
#define   GREEN           0x07E0
#define CYAN            0x07FF
#define MAGENTA         0xF81F
#define YELLOW          0xFFE0
#define WHITE           0xFFFF

#include "TFTLCD.h"

TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);

void setup(void) {
  Serial.begin(9600);
  Serial.println("8 Bit LCD test!");
 
 
  tft.reset();
 

  tft.initDisplay();
 
  testtext(RED);
  delay(2000);
  testlines(CYAN);
  delay(500);
  testfastlines(RED, BLUE);
  delay(500);
  testdrawrects(GREEN);
  delay(500);
  testfillrects(YELLOW, MAGENTA);
  delay(500);
  tft.fillScreen(BLACK);
  testfillcircles(10, MAGENTA);
  testdrawcircles(10, WHITE);
  delay(500);
  testtriangles();
  delay(500);
  testfilltriangles();
  delay(500);
  testRoundRect();
  delay(500);
  testFillRoundRect();
}
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: magolo87 on Jun 09, 2015, 10:03 pm
Good Evening.

I've bought one of this cheap mcufriend display and I have a problem to drive them.
One of the posted library does work but touch panel seems inverted.

Really i think most people have this problem, but they haven't noticed that all the display function are inverted.
The words are flipped and the color are inverted too. Black is white and white is black! (and all the other color are inverted).

There is a real solution already known?

Thank you in advance to all.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: sudharma99 on Jun 15, 2015, 05:32 pm
I have bought an ARDUINO UNO 3 and a TFT display 2.4" with Spfd5408 controller with built in video RAM buffer.
1_Tried various programs to test the TFT LCD Display. The only one worked was one [test_LCD_2_4] modified by  Andrologiciels, but the colours were all reversed. I, not being a programmer or not knowing anything about C++ had to change the values by trial and error and got it working.

2_Ran the program[TouchPaint_2_4] again the one modified by Andrologiciels, Again found the colours all wrong and the co-ordinates alloff by 90*, directions all hay wire. After hours of trial and error corrections got it working as required.

3_Tried the [Lit_BMP_2_4] but all the bitmap pictures were displayed in negative colour. Tried negating the colours of the bitmaps before loading to the SD card, they were displayed ok.
Since I can't find anything in the program to reverse the colours, please could someone help me to solve this problem.?
I am attaching all the 3 files
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: gusalon85 on Jun 16, 2015, 02:35 am
hola  hace mas o menos un mes que compre una tft 2.4" McuFriend  de http://www.mcufriend.com tiene el S6D0154  y he logrado hacer algunas cosas  y  he pobrado algunas librerias pero  quisiera hacer el ejercicio  de oscilospio como estas en el siguiente link;https://www.youtube.com/watch?v=Tj31_wOBp7k , no se si hago algo mal pero llevo 2 semanas trabajando en ello y aun no logro nada no se si me puedan ayudar
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: gusalon85 on Jun 16, 2015, 02:36 am
hello makes it about a month to buy a TFT 2.4 "McuFriend of http://www.mcufriend.com has S6D0154 and I managed to do some things and I pobrado some libraries but would like to exercise oscilospio how are you in the following ? link, https: //www.youtube.com/watch v = Tj31_wOBp7k, not if I do something wrong but I have two weeks working on it and still can not get anything do not know if I can help
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: rbright on Jun 16, 2015, 04:39 am
Many People including myself are wasting too much time & effort getting TFTs to work.

Could I request on behalf of all forum members that if anyone who has been successful to:


Yer I know we could all run off to places like AdaFruit but we are all addicted to ebay prices.

Life is not meant to be this difficult  >:(  >:(  >:(
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: sudharma99 on Jun 17, 2015, 07:13 am
Many People including myself are wasting too much time & effort getting TFTs to work.

Could I request on behalf of all forum members that if anyone who has been successful to:
  • identify the particular TFT they have purchased off ebay and link to seller
  • Link to manufacturers support page if in say english
  • Link to library used
  • Perhaps a copy of the successful sketch
  • What type of Arduino has been successful e.g. UNO / MEGA.


Yer I know we could all run off to places like AdaFruit but we are all addicted to ebay prices.

Life is not meant to be this difficult  >:(  >:(  >:(
I have posted the 3 sketches at post 103.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: rbright on Jun 17, 2015, 07:38 am
Interesting faults your experiencing sudharma but at least your getting some display action.

From what I've been reading there may even be some compatibility problems between later versions of the Arduino IDE and older libraries.

What I'm suggesting is a list of ebay sources of successful TFT and the library used & code examples.There are some out there I'm sure.

In desperation I've just ordered some 1.8 inch SPI THT LCDs which have been around a bit longer and appear to have better support with examples/tutorials on adafruit & youtube.
   
Regards all
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: gusalon85 on Jun 17, 2015, 09:16 pm
hello, I have TFT 2.4 "mcufriend with S6D0154 controlled and tried some programs but some exercises that libraries utft Investigate and wanted to know if anyone has funionado him or has made such exercises. and if I can give any advice .
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: shwan_uk on Jun 23, 2015, 12:06 am
Had similar issues to others, I'd tried various libraries and just got garbled screen.


I eventually found this: http://www.moleandroid.com/arduino-tutorial-2-how-to-setup-mcufriend-2-4-lcd-tft-libraries-and-avoid-white-screen/

and using this changed

uint16_t identifier = 0x9327;

My arduino Uno and TFT were from BangGood...

http://www.banggood.com/UNO-R3-ATmega328P-Board-2_4-Inch-TFT-LCD-Screen-Module-For-Arduino-p-945755.html

Hope this helps others...

shwan
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Magician on Jun 23, 2015, 01:20 am
I also have TFT from banggood (http://www.banggood.com/2_4-Inch-TFT-LCD-Shield-Touch-Board-Display-Module-For-Arduino-UNO-p-940735.html?p=P10613807093201410D8) , but my with controller 0154. After searching around, I get Adafruit's library, IMHO, their support of different kind controllers ( you never know what you get in a shipment) is the best, and plus touch screen add-on functionality included.
You may see working TFT (and link to download a code) from this link (http://coolarduino.blogspot.ca/2015/06/ad9850-based-sinewave-generator.html).
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Cookiehu on Jun 28, 2015, 09:44 pm
Hi, I am able to display something with 0x9341 but the pictures were not continuous as shown. Can anyone help me? I tried different libraries but the results were the same. Thanks!
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Magician on Jun 29, 2015, 04:37 am
It seems to me like wiring issue. How you connected TFT?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Cookiehu on Jul 04, 2015, 07:20 pm
Thanks for your reply. This is my first time using the forum and didn't know you actually have replied.
It came with a shield. The back of the shield says mcufriend.com, 2.4" TFT LCD shield. I just plugged into a uno, uploaded the example and changed the chip to 0x9341. I also tried another uno but with the same display. I checked the pins. It matched the description in the program.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Magician on Jul 04, 2015, 08:04 pm
Why you so sure its 9341? Have you tried adafruit's library? It could identify and print real controller type for you
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Cookiehu on Jul 05, 2015, 03:59 pm
Yes, I tried Adafruit, also all possible suggestions I can find in the web. I also tried a chip identifying code. It return 0x0000. Anyway, I hardcoded all numbers suggested in the examples and web. The others only give a white screen. 9341 is the only one gives something.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Stan_S on Jul 06, 2015, 12:35 am
Many People including myself are wasting too much time & effort getting TFTs to work.

Could I request on behalf of all forum members that if anyone who has been successful to:
  • identify the particular TFT they have purchased off ebay and link to seller
  • Link to manufacturers support page if in say english
  • Link to library used
  • Perhaps a copy of the successful sketch
  • What type of Arduino has been successful e.g. UNO / MEGA.


Yer I know we could all run off to places like AdaFruit but we are all addicted to ebay prices.

Life is not meant to be this difficult  >:(  >:(  >:(
I have been in the same boat with displays, I just purchased 2 from the company below. They supplied working library's and several examples that all worked with no problems. They also promptly answered a technical question. They seem like a good company to buy from.

http://www.aliexpress.com/store/1823449
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: minimanimo on Jul 18, 2015, 01:54 am
Hi,i've the same problem.
I have 2.4'' TFT display, MCUFRIEND (it had ILI9341 LCD driver) on Arduino Uno.
I've used this library,beacuse i have problem with the white screen,this: Library and videotutorial (http://www.moleandroid.com/arduino-tutorial-2-how-to-setup-mcufriend-2-4-lcd-tft-libraries-and-avoid-white-screen/)

I have tftpaint inverted touch-screen coordinates,but the change had no effect.
Can you help me?
I solved my problem and i share the solution.

Original part of code:

Code: [Select]
X = map(p.x, TS_MINX, TS_MAXX, tft.width(),0);
 Y = map(p.y, TS_MINY, TS_MAXY, tft.height(), 0);


New Code:
Code: [Select]
X = map(p.x, TS_MINX, TS_MAXX, 0, tft.width());
 Y = map(p.y, TS_MINY, TS_MAXY, 0, tft.height());
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: hadise on Aug 09, 2015, 10:12 am
hi dear friends
I want to use from this module for arduino UNO :
read  values of  3 sensors,but 5 of analoge pins connect to TOUCh LCD :(
can you help me for doing this work ?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: hadise on Aug 09, 2015, 10:17 am
hi dear friends
I want to use from this module for arduino UNO :
read  values of  3 sensors,but 5 of analoge pins connect to TOUCh LCD :(
can you help me for doing this work ?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: zoomx on Aug 09, 2015, 02:25 pm
I believe that is very difficult.
It is more simple to use an SPI TFT module or, if possible, to use I2C sensors. Or get a Mega instead of a UNO taking in account that some libraries don't work with Mega.
Unfortunately these parallel TFT modules use too much pins.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: hadise on Aug 09, 2015, 03:48 pm
I believe that is very difficult.
It is more simple to use an SPI TFT module or, if possible, to use I2C sensors. Or get a Mega instead of a UNO taking in account that some libraries don't work with Mega.
Unfortunately these parallel TFT modules use too much pins.
thank you very much :)
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: programmerjeff on Oct 11, 2015, 01:34 am
Hi,i've the same problem.
I have 2.4'' TFT display, MCUFRIEND (it had ILI9341 LCD driver) on Arduino Uno.
I've used this library,beacuse i have problem with the white screen,this: Library and videotutorial (http://www.moleandroid.com/arduino-tutorial-2-how-to-setup-mcufriend-2-4-lcd-tft-libraries-and-avoid-white-screen/)

I have tftpaint inverted touch-screen coordinates,but the change had no effect.
Can you help me?
Yes took me a while as well, first here the specs to my display:

- mcufriend 2.4" TFT LCD (9341)
- identifier 0x9341
- Link to where I bought it (http://www.ebay.com/itm/221728390701?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT)


As another user said, you can make the following changes
(I have also attached the code that runs on mine)

Code: [Select]

From:
//#define YP A1  // must be an analog pin, use "An" notation!
//#define XM A2  // must be an analog pin, use "An" notation!
//#define YM 7   // can be a digital pin
//#define XP 6   // can be a digital pin

To:
#define YP A2  // must be an analog pin, use "An" notation!
#define XM A1  // must be an analog pin, use "An" notation!
#define YM 6   // can be a digital pin
#define XP 7   // can be a digital pin


Second make this next change:

Code: [Select]

From:
p.x = map(p.x, TS_MINX, TS_MAXX, tft.width(), 0);
p.y = map(p.y, TS_MINY, TS_MAXY, tft.height()-BOXSIZE*2, 0);

To:
p.x = map(p.x, TS_MAXX, TS_MINX, 0, tft.width() );
p.y = map(p.y, TS_MAXY, TS_MINY, 0, tft.height() );
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: f8vpe on Oct 21, 2015, 10:01 pm
For this display you may use the Adafruit_TFTLCD and the touchscreen librarys.

In the setup area add a line  uint16_t identifier = 0x9341;  just after  tft.reset();  (tftpaint.ino)
ILI9341 is the TFT controler, Adafruit has now a Adafruit ILI9341 library who's giving a lot of errors while compiling.

If you want to use I2C you have to wire the reset-pin of the screen to the reset-pin of the arduino en change #define LCD_RESET to A6 (not connected on the UNO)

Your example should work now.


Succes, Robert.

Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: scgECU on Oct 26, 2015, 06:13 pm
Hello pals,

Please, I need your help: I have also bought that tft lcd with st7783... After some struggle, I managed to make it works... However I found it does not work properly: Everytime I cut the energy I had to run a sketch to wake up the chip, since after restablishing the energy the shield does nothing but shows a white screen... To wake up the chip (st7783) I set the CS to low for some seconds, then make a void.begin(), then repeat every 2 o 3 seconds a fill screen command... while doing this stuff, the shield does not do anything, but after a while by reloading the previously working sketch it worked again...

Now, PLEASE I need your help to turn off the backlight leds, I don't find information to do this in this particular shield...

Thanks in advance!
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: david_prentice on Oct 26, 2015, 07:25 pm
There is no way that you can turn off the backlight.    Just do a tft.fillScreen(BLACK) if you want a dark screen.

The ST7781 should work perfectly.    Which library are you using?

The only "spare" pin is A5.    If you wanted to cut tracks on your shield,    you could switch a transistor or MOSFET to control the backlight.

David.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: scgECU on Oct 26, 2015, 10:55 pm
Thanks David!

Adafruit_GFX and SWTFT... the sketch firts ask for the number of the chip and it returns 7783, not 7781. The problem is as I explained before.

Since the manufacture seems to be very poor I was hoping to find a safer way to control the backlight leds without having to open the tftlcd...

Regards,

SCG
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: david_prentice on Oct 26, 2015, 11:54 pm
I presume that SWTFT library handles the ST7781 controller ok.    (ST7781 is the part number.   It returns an ID of 0x7783)

Yes,   the mcufriend UNO shields are very cheap.    I would not describe the manufacture as "poor".   But you may have one with screen or Touch that is not perfectly straight.

As I said,   the Shield uses most of the UNO's header pins.    The backlight is always lit.    You would need to separate the TFT from the pcb.   Then alter the circuitry by adding a transistor to switch the backlight.   Then re-assemble the display.

Why do you want to turn the backlight off?   These displays take a lot of current.   They are not suitable for battery operation.

David.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: scgECU on Oct 27, 2015, 12:31 am
Thanks again David!

I am planning to use this for a device that will work with a battery, so I was looking to reduce energy consumption... I have already notice that the tftdisplay get noticeable hot after some time of operation, so I guessed that turning off the backlights will reduce its consumption.

If I get it clear, you are telling me that even if I get control over the backlight leds the energy consumption would be that high so the application would no be ok to work with a battery, am I right? If so, what would be your recommendation of use instead of this kind of display?

Thanks in advance,

scgECU
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: david_prentice on Oct 27, 2015, 01:08 am
Hack your pcb.    Switch the backlight via a transistor.    Turn the backlight off and send your Arduino to sleep when not busy.

Seriously,   batteries are not going to last very long.   Even with you going to sleep.   I would use a series resistor to reduce backlight current too.

David.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: studentas on Oct 29, 2015, 11:20 pm
hi,
Is anybody help, how to update text without blinking display with fillscreen?
In my simple example "IN:" must be static and updating only 'i' value. Thanx.

Code: [Select]
#include <Adafruit_GFX.h>    // Core graphics library
#include <SWTFT.h> // Hardware-specific library
#define BLACK   0x0000
SWTFT tft;
int i=0;
void setup(void) {
 tft.reset();  tft.begin(tft.readID());
 tft.fillScreen(BLACK);}
void loop()
{i=i+1;
tft.fillScreen(BLACK); tft.setCursor(0, 0); tft.setTextSize(3);
tft.print("IN: ");tft.print(i); tft.println();
delay(1000);}
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: david_prentice on Oct 30, 2015, 12:12 am
Go on.   Think about it.    The easiest way is to draw a flowchart on paper with a pencil.

Then re-arrange the flow to produce the result that you would like.

Hint.   Just erase the small area where you write the new number.
Alternatively,    setTextColor()  with both the foreground and background colour. 

David.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: studentas on Oct 31, 2015, 08:54 pm
Go on.   Think about it.    The easiest way is to draw a flowchart on paper with a pencil.
Then re-arrange the flow to produce the result that you would like.
Hint.   Just erase the small area where you write the new number.
Alternatively,    setTextColor()  with both the foreground and background colour.  
David.
thanx David for direction, but i don't understand how 'erase small area'?
i found WO with fillrect, but it looks like stone age solution :( but result suitable
I think must be more intelligent solution, without gaming with coordinate and paint eraser ...

Code: [Select]
#include <Adafruit_GFX.h>    // Core graphics library
#include <SWTFT.h> // Hardware-specific library
#define BLACK   0x0000
SWTFT tft;
int i=0;
void setup(void) {
 tft.reset();  tft.begin(tft.readID());
 tft.fillScreen(BLACK);}
void loop()
{i=i+1;
tft.setCursor(0, 30); tft.fillRect(50,30,150,30,BLACK);tft.setTextSize(3);
tft.print("IN: ");tft.print(i); tft.println();
delay(1000);}
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: studentas on Oct 31, 2015, 09:14 pm
thanx David for direction, but i don't understand how 'erase small area'?
i found WO with fillrect, but it looks like stone age solution :( but result suitable
I think must be more intelligent solution, without gaming with coordinate and paint eraser ...
I find more intelligent solution, but still not enough for perfect :)
Code: [Select]
void loop()
{i=i+1;
tft.setCursor(0,30); tft.setTextSize(3); tft.setTextColor(WHITE); tft.print("IN: ");
tft.setCursor(50,30);tft.setTextColor(BLACK); tft.print(old);
tft.setCursor(50,30);tft.setTextColor(WHITE); tft.print(i); tft.println();
old=i;
delay(1000);}
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: david_prentice on Oct 31, 2015, 10:04 pm
The first step is to learn how to format code neatly.   Then place it within CODE tags.   e.g.
Code: [Select]

int old;
void loop()
{
    i = i + 1;
    tft.setCursor(0, 30);
    tft.setTextSize(3);
    tft.setTextColor(WHITE);
    tft.print("IN: ");
    tft.setCursor(50, 30);
    tft.setTextColor(BLACK);
    tft.print(old);
    tft.setCursor(50, 30);
    tft.setTextColor(WHITE);
    tft.print(i);
    tft.println();
    old = i;
    delay(1000);
}


Yes,  I tried your solution.   It works fine.   But there is a neater way:
Code: [Select]

void loop()
{
    i = i + 1;
    //    tft.fillScreen(BLACK);
    tft.setTextColor(WHITE, BLACK);  //foreground, background
    tft.setCursor(0, 0);
    tft.setTextSize(3);
    tft.print("IN: ");
    tft.print(i);
    tft.print("    ");   //trailing spaces
    tft.println();
    delay(1000);
}


As an exercise for the reader,   what statements could you remove from the loop() and put in the setup() ?
What happens when i goes from 32767 to -32768 ?
Why did I add the trailing spaces?
Is there a different way to overwrite old numbers?

David.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: studentas on Nov 01, 2015, 07:50 pm
{...} As an exercise for the reader,   what statements could you remove from the loop() and put in the setup() ?
What happens when i goes from 32767 to -32768 ?
Why did I add the trailing spaces?
Is there a different way to overwrite old numbers?
David.
It is only example for dynamic info visualing problem. In real project will be loop for displaying heater temperature, calculating his power and coefficient of efficiency.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: ha2709 on Nov 25, 2015, 11:34 am
Just for the sake of trying to help and knowing what headache i had trying to figure this out, here's some icecream for you:

Download the latest ADAfruit libraries and add them to where your userlibrary is located (mine is at: C:\Users\QUAD ONE\Documents\Arduino\libraries).

Load up the GraphicsTest.ino that comes with this library

In the GraphicsTest.ino, change the line:
Code: [Select]

uint16_t identifier = tft.readID();

to
Code: [Select]

uint16_t identifier = 0x9341;

This way you "hardcode" what driver should be used as it can't resolve this on it's own

If this doesn't work you can try to substitute with the other possibie types:

0x9325;
0x9328;
0x9341;
0x8357;
0x7575;

Good luck (again)

 

I succesful at uint16_t identifier = 0x9341;
Many thanks
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Muurman on Aug 22, 2016, 03:35 pm
Why is that reset nedeed ? Can I not Just leave it disconnected and configure it on A6?

And is the read nessesary? 
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: david_prentice on Aug 22, 2016, 03:46 pm
Post a link to the actual display that you have.

Yes,  all the MCUFRIEND shields need the Reset pin.
If you know which controller you have,  it might be possible to make a hardware modification.

If you know which controller you have,  you do not need to read the ID.

Note that Ebay vendors often lie about controllers.

David.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Muurman on Aug 22, 2016, 09:01 pm
i have a couple :
http://www.ebay.de/itm/111768965859

http://www.ebay.de/itm/172239752361

http://www.ebay.de/itm/111875574700 ( 3.5 inch )

1 of the 2.4 is working with the id : 37697 the other with id : 37672

I already tried and read can i set to for example A6

So i can free the read pin.

But why is the reset used?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: david_prentice on Aug 22, 2016, 10:59 pm
I struggled with a calculator to discover that you were talking about 0x9341 and 0x9328.
i.e. ILI9341 and ILI9328.

Both controllers are supported by MCUFRIEND_kbv library.

You can make a hardware mod for the ILI9341 to work without a Hardware Reset pin.
This will not work with a ILI9328.

David.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: RajoAlfa on Nov 10, 2016, 09:42 pm
Hi, my LCD 2.4' from eBay (mcufriend, dont know what chip it uses) does not work with MCUFRIEND_kbv library, but works with spfd5408 library from adafruit. reversed axis fixed by changing code to this:
 
Code: [Select]

// Calibrate values
#define TS_MAXX 125
#define TS_MINY 85
#define TS_MINX 965
#define TS_MAXY 905

(switching MAXY with MINY).

But i have hard time understanding the touchscreen reading method (spfd5408 library).
Can someone explain?

Code: [Select]

void loop()
{
  digitalWrite(13, HIGH);
  TSPoint p = ts.getPoint();
  digitalWrite(13, LOW);

  // if sharing pins, you'll need to fix the directions of the touchscreen pins
  //pinMode(XP, OUTPUT);
  pinMode(XM, OUTPUT);
  pinMode(YP, OUTPUT);
  //pinMode(YM, OUTPUT);

  // we have some minimum pressure we consider 'valid'
  // pressure of 0 means no pressing!

  if (p.z > MINPRESSURE && p.z < MAXPRESSURE) {
    /*
    Serial.print("X = "); Serial.print(p.x);
    Serial.print("\tY = "); Serial.print(p.y);
    Serial.print("\tPressure = "); Serial.println(p.z);
    */
   
    if (p.y < (TS_MINY-5)) {
      Serial.println("erase");
      // press the bottom of the screen to erase
      tft.fillRect(0, BOXSIZE, tft.width(), tft.height()-BOXSIZE, BLACK);
    }
    // scale from 0->1023 to tft.width

    // *** SPFD5408 change -- Begin
    // Bug in in original code
    //p.x = map(p.y, TS_MINY, TS_MAXY, 0, tft.height());
    p.x = map(p.x, TS_MINX, TS_MAXX, 0, tft.width());
    // *** SPFD5408 change -- End
    p.y = map(p.y, TS_MINY, TS_MAXY, 0, tft.height());;

    /*
    Serial.print("("); Serial.print(p.x);
    Serial.print(", "); Serial.print(p.y);
    Serial.println(")");
    */
    if (p.y < BOXSIZE) {
       oldcolor = currentcolor;

       if (p.x < BOXSIZE) {
         currentcolor = RED;
         tft.drawRect(0, 0, BOXSIZE, BOXSIZE, WHITE);
       } else if (p.x < BOXSIZE*2) {
         currentcolor = YELLOW;
         tft.drawRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, WHITE);
       } else if (p.x < BOXSIZE*3) {
         currentcolor = GREEN;
         tft.drawRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, WHITE);
       } else if (p.x < BOXSIZE*4) {
         currentcolor = CYAN;
         tft.drawRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, WHITE);
       } else if (p.x < BOXSIZE*5) {
         currentcolor = BLUE;
         tft.drawRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, WHITE);
       } else if (p.x < BOXSIZE*6) {
         currentcolor = MAGENTA;
         tft.drawRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, WHITE);
       }

       if (oldcolor != currentcolor) {
          if (oldcolor == RED) tft.fillRect(0, 0, BOXSIZE, BOXSIZE, RED);
          if (oldcolor == YELLOW) tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, YELLOW);
          if (oldcolor == GREEN) tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, GREEN);
          if (oldcolor == CYAN) tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, CYAN);
          if (oldcolor == BLUE) tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, BLUE);
          if (oldcolor == MAGENTA) tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, MAGENTA);
       }
    }
    if (((p.y-PENRADIUS) > BOXSIZE) && ((p.y+PENRADIUS) < tft.height())) {
      tft.fillCircle(p.x, p.y, PENRADIUS, currentcolor);
    }
  }
}
TSPoint waitOneTouch() {

  // wait 1 touch to exit function
 
  TSPoint p;
 
  do {
    p= ts.getPoint();
 
    pinMode(XM, OUTPUT); //Pins configures again for TFT control
    pinMode(YP, OUTPUT);
 
  } while((p.z < MINPRESSURE )|| (p.z > MAXPRESSURE));
 
  return p;
}



Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: david_prentice on Nov 10, 2016, 10:10 pm
Quote
Hi, my LCD 2.4' from eBay (mcufriend, dont know what chip it uses) does not work with MCUFRIEND_kbv library, but works with spfd5408 library from adafruit. reversed axis fixed by changing code to this:
Go on.   What does LCD_ID_readreg sketch say?
As far as I know,   Adafruit has never produced an spfd5408 library.
Google finds a library from Joao Lopes.   But it never even looks for an ID of 0x5408 (SPFD5408)

I have never seen a SPFD5408.   Until very recently,   I had never found a a user with a genuine SPFD5408.

I suggest that you identify the actual controller that you have got.

Then I will explain how the TouchScreen library works with Mcufriend Shields.

David.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: RajoAlfa on Nov 11, 2016, 12:22 pm
Yes thats the one.
Title says : "Adafruit Libraries changed to works in TFT 2.4 shields with the SPFD5408 ....."
Link ->  https://github.com/JoaoLopesF/SPFD5408
I'm really sorry if i didn't gave credit to the right guy/team, wouldn't like that if it happened to me.
Controller ->you mean arduino or lcd?
Arduino Uno and TFT LCD 2.4' , in front it says : HR4 8346S01 G4/1, at the back : 2.4'' TFT LCD Shield (35702)
http://www.mcufriend.com
cant upload pictures, i will if you tell me how.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: RajoAlfa on Nov 11, 2016, 12:36 pm
Read Registers on MCUFRIEND UNO shield
controllers either read as single 16-bit
e.g. the ID is at readReg(0)
or as a sequence of 8-bit values
in special locations (first is dummy)

reg(0x0000) 00 00   ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 38 80 00   Manufacturer ID
reg(0x0009) 00 00 61 00 00   Status Register
reg(0x000A) 08 08   Get Powsr Mode
reg(0x000C) 06 06   Get Pixel Format
reg(0x0061) 00 00   RDID1 HX8347-G
reg(0x0062) 00 00   RDID2 HX8347-G
reg(0x0063) 00 00   RDID3 HX8347-G
reg(0x0064) 00 00   RDID1 HX8347-A
reg(0x0065) 00 00   RDID2 HX8347-A
reg(0x0066) 00 00   RDID3 HX8347-A
reg(0x0067) 00 00   RDID Himax HX8347-A
reg(0x0070) 00 A6   Panel Himax HX8347-A
reg(0x00A1) 00 00 00 00 00   RD_DDB SSD1963
reg(0x00B0) 00 00   RGB Interface Signal Control
reg(0x00B4) 00 02   Inversion Control
reg(0x00B6) 00 24 02 00 00   Display Control
reg(0x00B7) 00 00   Entry Mode Set
reg(0x00BF) 00 00 00 00 00 00   ILI9481, HX8357-B
reg(0x00C0) 0A 0A 0A 0A 0A 0A 0A 0A 0A   Panel Control
reg(0x00C8) 40 40 40 40 40 40 40 40 40 40 40 40 40   GAMMA
reg(0x00CC) 00 00   Panel Control
reg(0x00D0) 00 00 00   Power Control
reg(0x00D2) 00 00 00 00 00   NVM Read
reg(0x00D3) 00 01 16 02   ILI9341, ILI9488
reg(0x00DA) 38 38   RDID1
reg(0x00DB) 80 80   RDID2
reg(0x00DC) 00 00   RDID3
reg(0x00E0) 00 22 23 25 08 10 14 40 7B 50 0B 1B 22 20 2F 37   GAMMA-P
reg(0x00E1) 00 0C 14 23 0E 14 15 36 59 46 0B 1F 27 1F 20 22   GAMMA-N
reg(0x00EF) 00 00 00 00 00 00   ILI9327
reg(0x00F2) 00 24 04 04 1E 00 00 00 00 00 00 00   Adjust Control 2
reg(0x00F6) 00 00 00 00   Interface Control


From LCD_ID_readreg sketch
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: david_prentice on Nov 11, 2016, 12:48 pm
This is a new (unknown) controller that has appeared on the market.
Code: [Select]

reg(0x0004) 00 38 80 00   Manufacturer ID
reg(0x00D3) 00 01 16 02   ILI9341, ILI9488

It seems to have an ID = 0x1602 or possibly 0x3880
You can try the test_3880 (https://github.com/prenticedavid/MCUFRIEND_kbv/tree/test_3880) branch on GitHub.  (it will report an ID = 0x3880)

Apparently the display is jittery.  I have promised to post a test sketch but it is difficult when I do not have a datasheet.    Please ask the Ebay Vendor for the make or model,  and let me know.

David.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: RajoAlfa on Nov 12, 2016, 01:18 pm
This purchase of mine was 1 year back.
I have messeged him before because of the wrong label -> in ad was written " 3.5' display with some other picture ". No response.
( http://www.ebay.co.uk/usr/moncss?_trksid=p2057872.m2749.l2754 )
(256 negative responses. )
He also apparently disappeared from market. xD 
So i work with what i have.
I have it working nice, i can put anything to display, etc.
But i don't quite understand the touchscreen code. It looks to me like an incomplete library since many #define in the simple "paint" and no simple read_touch, give x and y value, use them. It need to open close digital pins, map the readings, and i can't use normal example: ... if(x<100 && x>200){... function?
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: david_prentice on Nov 12, 2016, 03:00 pm
Have you tried the library examples?

Note that you always have to call pinMode() for YP, XM after every TouchScreen method because these pins are shared by the TFT.

David.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: RajoAlfa on Nov 14, 2016, 01:17 pm
Yes, it's white screen on every example.
I kinda understand the code, here is all you need for touch input to work:
Code: [Select]

 while(true){
      digitalWrite(13, HIGH);
      TSPoint p = ts.getPoint();
      digitalWrite(13, LOW);
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      if (p.z > MINPRESSURE && p.z < MAXPRESSURE) {   //here you can adjust the sensitivity of the touch!
         p.x = map(p.x, TS_MINX, TS_MAXX, 0, tft.width());
         p.y = map(p.y, TS_MINY, TS_MAXY, 0, tft.height());
         if(p.x< 239){                       //it covers from 0 to 239 pixel in x axis (screen is 240x320)
           if(p.y<107 && p.y>1){         //if you touch first 1/3 of the screen...
             //do stuff..
           }
           if(p.y<214 && p.y>107){      //if you touch second 1/3 of the screen...
             //do stuff..
           }
           if(p.y<319 && p.y>215){        //if you touch third 1/3 of the screen...
             //do stuff..
           }
          }
        }
      }

 only i would put this
Code: [Select]

pinMode(XM, OUTPUT);
pinMode(YP, OUTPUT);
into void setup(){...} maybe
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: david_prentice on Nov 14, 2016, 01:37 pm
No,  that would not work.

As soon as you call getPoint(),  the XM,YP pins are set to INPUT mode.   The next TFT call will crash.

There are several solutions:
1.  the Touch library should always restore the mode of XM, YP
2.  the TFT library should always set the mode of XM, XP on every call
3.  the User application restores the mode of XM, YP after every getPoint()

Since most apps will have millions of TFT calls e.g. drawPixel() but not many getPoint() calls,  the cost of (2) is far more wasteful than (1).

And since many TFT apps do not use the Touch at all,  (3) would be the most "efficient".
OTOH,  (1) would save you having to worry about it.

David.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: RajoAlfa on Nov 14, 2016, 02:30 pm
yes, youre right, i missed that part when it switches to input.
(1) is way to go then.
Thank you
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: david_prentice on Nov 14, 2016, 02:39 pm
You would have to persuade the TouchScreen library authors first.

All new library owners would be happy.
But it means that any "old" library versions would fail.

Just accept the status quo.   And do the workaround with (3)
If you create a helper function that combines the getPoint() and pinMode() calls,   you handle it one place.

David.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 - calibration
Post by: zvarduinoforum on Dec 23, 2016, 02:53 pm
Can you, pls, explain the algorithm and math behind calibration method as posted in #19 ?
It works pretty well for my 2.4" TS, however not sure how exactly the correction is calculated and implemented via map().

Thx, ZV
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: david_prentice on Dec 23, 2016, 03:17 pm
It is quite simple.   Obtain the values for LEFT,  RIGHT of the Touch panel.
These are typically 150, 930 or 930, 150.

There are several Calibration sketches that can determine the LEFT, RIGHT, TOP,  BOT values returned by ts.getPoint().   e.g. get more accurate values than 150, 930

Then you map LEFT, RIGHT to 0, width() to obtain the X pixel coordinate.
Similarly for Y.

David.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 - calibration
Post by: zvarduinoforum on Dec 23, 2016, 11:10 pm
Thx, David !
Conceptually, it is indeed straightforward.
However, the details of implementation makes me curious.
Proposed code in post #19 uses two point calibration, which is OK for small TFT.
The goal of the calibration is to refine the default values (TS_MINX, TS_MAXX) for "improved" mapping.
Assuming no skew, the standard calibration equation is: x2=x1*k +a;
- k is a slope, and "a" is an offset;
- obviously k= (TS_MAXX-TS_MINX)/width, while I do not have a good idea how to define "a" via TMINX.

Pls see below excerpt from TS_calibration code, as in #19.
As you can see, both coefficients are calculated, using two sample points (opposite corners).
In the code derivation, I use, points p1, p2 are obtained via map(), using defaults TS_MINX, TS_MAXX (some manipulation should be implemented due to rotation of TFT screen vs. Touch screen).
The process starts with the defaults for LEFT-RIGHT (150, 930), which are used for 1st mapping "guess".
Then TS_MINX is being adjusted for the offset, but I don't understand the math behind the code...
 Note:(width-20), (height-20) are used because two sample dots are shown with the offset of (10,10) from the corners.

Thx, VZ.

Code: [Select]

 temp=p2.x-p1.x; // Calculate the new coefficients, get X difference
 tempL=((long)temp*1024)/(tft.width()-20);
 TS_MINX=p1.x-( (tempL*10)>>10);// 10 pixels du bord
 TS_MAXX=p1.x+( (tempL*tft.width())>>10);// 220 pixels entre points
 temp=p2.y-p1.y; // ¨get Y difference
 tempL=((long)temp*1024)/(tft.height()-20);
 TS_MINY=p1.y-( (tempL*10)>>10);// 10 pixels du bord
 TS_MAXY=TS_MINY+( (tempL*tft.height())>>10);


Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: david_prentice on Dec 23, 2016, 11:37 pm
God invented the map() function so you don't have to.

I am amazed by how people like to complicate things.

David.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: Shubhu_nitg on Feb 25, 2017, 12:49 pm
I am trying to interface 2.4" tft touch display for S6D0154 driver but i m not getting result please help me to display sensor data on touch screen display with arduino uno and mega both for S6D0154 library.
Title: Re: 2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks
Post by: david_prentice on Feb 25, 2017, 01:00 pm
What S6D0154 library?
Please post a link to the "library"
Please post a link to the actual display that you have bought.

David.