2.4 inch TFT touch LCD Screen Module For Arduino UNO R3 SD low price jocks

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

st7783.zip (1.53 MB)

arduhckr:
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

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=..." ?

It works good! Sorry, after some try I noticed that there was 2 libraries called "TouchScreen" in my IDE. Thank you.

Thank you arduhckr, yout last post makes both displays working!

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?

magnetman:
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.

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?

paulftw:
Anyone knows how to fix this...?

Post #14.

casemod:
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.

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

DSC_0030.JPG

DSC_0029.JPG

DSC_0028.JPG

DSC_0027.JPG

stez90:
Any advice?

Best advice is to read the Thread!! Have you seen post #14?

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).. :frowning:

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

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

stez90:
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.

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

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?

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 :slight_smile: .. Seems like that Adafruit renamed Point function to TSPoint.. I'll try to modify something..

Anyway Thank you!

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

stez90:
Sorted it out... I left installed the Adafruit library, but "st7783" has it integrated... Conflicts all around :blush:
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?

The st7783. I removed all other libraries.
All with 1.0.5 IDE.
With 1.5.7 beta it gives

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.

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..

stez90:
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);

tft.setTextColor(ST7735_YELLOW, ST7735_BLACK);
tft.setTextSize(2);
tft.println("Hello World!");