Go Down

Topic: UTFT Library for Uno and 2.4 tft/lcd shield (Read 785 times) previous topic - next topic

Zyklotrop

Hello there

I have bought an 2.4" tft/lcd shield that fits the UNO I have:
https://www.ebay.com/itm/192163706724

Any Idea what I have to do to start the screen working?
It worked with examples of the UTFT-Library, but now I try to write an own program and the screen is only white. When I use myGLCD.getDisplayXSize(), it gives me the right value.
What do I have to write in UTFT myGLCD()?
Or is the problem something else?

The full code:
Code: [Select]
#include <UTFT.h>
#include <URTouch.h>

// Declare which fonts we will be using

extern uint8_t arial_bold[];
extern uint8_t Inconsola[];
extern uint8_t SevenSegNumFont[];

// ILI9341
UTFT myGLCD(ILI9341_S5P,11,13,10,8,9);  // Remember to change the model parameter to suit your display module!

String xsize, ysize;

void setup()
{

  myGLCD.InitLCD();
  myGLCD.clrScr();
  myGLCD.setContrast(32);
  myGLCD.setBrightness(8);
  xsize = myGLCD.getDisplayXSize();
  ysize = myGLCD.getDisplayYSize();
  // myGLCD.setFont(Insola);

  Serial.begin(9600);

  Serial.print(xsize + " " + ysize);

  myGLCD.fillScr(VGA_BLUE);
  myGLCD.setBackColor(VGA_RED);
}

void loop()
{
  myGLCD.fillScr(VGA_GREEN);
  myGLCD.setColor(VGA_BLACK);
  myGLCD.setColor(VGA_BLUE);
  myGLCD.drawLine(10, 10, 100, 100);

  delay(10000);
}


Thank you for answers!

david_prentice

You have an Mcufriend Uno Shield.   The clue is in the
Quote
2.4" TFT LCD Shield (ili9340) http://www.mcufriend.com
printed on the pcb.

UTFT does not support any 8-bit parallel ILI9341.   And UTFT does not support the shield pinout.

Install Adafruit_GFX and MCUFRIEND_kbv libraries with the IDE Library Manager.

David.

Zyklotrop

#2
May 14, 2018, 09:26 pm Last Edit: May 14, 2018, 09:44 pm by Zyklotrop
Thank you for the fast answer.
Is there a possibility to modify the UTFT for 8-bit ILI9341?
And any manual or list of functions for the mcufriend library?

david_prentice

Most graphics programs use the Adafruit_GFX style of methods.
They are the same methods for circles, lines, printing text, ...

From the library README.md file:
Quote
MCUFRIEND_kbv inherits all the methods from
the Adafruit_GFX class: https://learn.adafruit.com/adafruit-gfx-graphics-library/overview
and Print class: https://www.arduino.cc/en/Serial/Print
If you want UTFT to support ILI9341_8 you will have to ask the Author: Henning Karlsen.
And then write all your programs to use UTFT methods.

David.

Go Up