Go Down

Topic: TFT_HX8347-G ID=0x7575 Mirrored text (Read 788 times) previous topic - next topic


May 30, 2018, 05:52 pm Last Edit: May 30, 2018, 05:54 pm by xeterz

Hello everyone, i hope your all doing great.

First of all, let me start by saying that my english is not that great.

Ok so, I have a huge problem in my tft_HX8347G, when i run the code, the text is mirrored and i have

done many researches , yet i cant find a solution, Id like you to answer as fast as possible because i have

some work to do with this tft lcd screen.

PS: im not that great at using arduino

PS2 : i tried to rotate ( from 1 to 7 ) didnt work

Here is the code im using:

Code: [Select]

#include <Adafruit_TFTLCD.h>
#include <Adafruit_GFX.h>    
#include <TouchScreen.h>

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

#define TS_MINX 122
#define TS_MINY 111
#define TS_MAXX 942
#define TS_MAXY 890

#define YP A3
#define XM A2
#define YM 9
#define XP 8

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


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

boolean buttonEnabled = true;

void setup() {
  uint16_t identifier = tft.readID();
  tft.print("TFT LCD Touch Screen");
  tft.print("Tutorial\n\n            by");
  tft.print("Mert Arduino and Tech");
  tft.fillRect(50,180, 210, 40, RED);
  tft.print("Please Subscribe");


void loop() {
  TSPoint p = ts.getPoint();
  if (p.z > ts.pressureThreshhold) {
   p.x = map(p.x, TS_MAXX, TS_MINX, 0, 320);
   p.y = map(p.y, TS_MAXY, TS_MINY, 0, 480);
   if(p.x>50 && p.x<260 && p.y>180 && p.y<270 && buttonEnabled){
    buttonEnabled = false;
    pinMode(XM, OUTPUT);
    pinMode(YP, OUTPUT);
    tft.print(" Thank you\n\n       for\n\n     support");


Post a link to the actual display that you have bought.

If it is a genuine Adafruit display,   I would expect an Adafruit product to work 100% with genuine Adafruit libraries.   Note that there are many hacked versions of the Adafruit_TFTLCD library.

If you have a Red 2.4" or Blue 2.8" Mcufriend shield read this thread



Hello , thank u mr david for your answer.

Ok so the thing is, i dont know the display of my tft, because i was not the one who bought it , the reason being is that its actually a guy who like delivers electronical stuff for money , so basically since this is related to our projects, our school paid a person to get us the needed stuff for our projects, which means that i cannot contact that person so as to know the display, to be honest i did waste like 6hrs just to know the driver / id of this tft, i dont know about the display , if you could tell me how i can know it would be very helpful.

Also my tft is a red 2.4 mcufriend , does this mean that adafruit is not the display i need?


Follow those iinstructions.   It should work for 0x4747, 0x6767, 0x7575, 0x9595.

It will tell you which ID you have.     All the examples should work 100%.

Please  note that I have never owned these  particular displays.    So I rely on feedback from users.
If you still have mirroror colour problems,   please tell me.   I should be able to correct them easily.



Hello again, i followed those instructions , yet still  the same problem , i really dont know where is the problem but i believe that it should be something simple that i just cant figure out, thank you for your help


Please explain the problem  e.g. run the graphictest_kbv sketch.

In the Penguin screens say which ones are mirrored and how e.g. right-left or bottom-top.

It is quite possible that everyone else has 0x4747, 0x6767, 0x9595.
And your 0x7575 is mirrored.

Just tell me.



Hello again,

to be quite honest with you, i dont know what you meant by that, this is my first time using a tft so there are some stuffs that i still dont understand,  sorry for making your help harder..


Run the graphictest_kbv sketch from the examples.

It draws lines, circles, ... and reports the execution time.
Then it draws a Blue band with a Penguin in Portrait,  Green Band in Landscape,  Red band in Portrait_Rev,   Gray band in Landscape_Rev.

Just say what your ID is.    e.g. ID = 0x7575
And say which Penguin screens look wrong.  e.g. Green Band is mirrored right-left.  Blue Band is ok.

It should be easy enough to explain in words.
You could make a video if you like.



thank you again for your answer.

Now the problem is when i run the exemple, they give me this error

Code: [Select]

C:\Users\Akram\AppData\Local\Temp\cc3ev1yY.ltrans0.ltrans.o: In function `pushColors':

C:\Program Files (x86)\Arduino\libraries\MCUFRIEND_kbv/MCUFRIEND_kbv.cpp:637: undefined reference to `penguin'

C:\Program Files (x86)\Arduino\libraries\MCUFRIEND_kbv/MCUFRIEND_kbv.cpp:637: undefined reference to `penguin'

C:\Program Files (x86)\Arduino\libraries\MCUFRIEND_kbv/MCUFRIEND_kbv.cpp:638: undefined reference to `penguin'

C:\Program Files (x86)\Arduino\libraries\MCUFRIEND_kbv/MCUFRIEND_kbv.cpp:638: undefined reference to `penguin'

collect2.exe: error: ld returned 1 exit status


May 30, 2018, 10:47 pm Last Edit: May 30, 2018, 10:48 pm by david_prentice
If you installed libraries via Library Manager everything should work fine.

The Library Manager will install them in
C:\Users\David Prentice\Documents\Arduino\libraries\Mcufriend_kbv
 obviously with your User name.

It looks as if you have the library in
C:\Program Files (x86)\Arduino\libraries\MCUFRIEND_kbv/MCUFRIEND_kbv.cpp
 which is not correct
You should delete that MCUFRIEND_kbv directory.

I strongly recommend that you always use the Library Manager.



Hi again, sorry for the late answer.

So after looking deep , i managed to fix the mirror text, but now, another problem has unfortunatly occured...

here is an exemple, this is an image from a youtuber who wrote the code that im currently using ( i did some changes so that it can work on my tft )

and here is mine

ok so , this problem is not a big deal i think , the biggest problem is that even thought i have a menu, when i click on an option that should normally direct me into another page, nothing happens, as if my screen was not working...


I managed to resolve the not working touchscreen !!!!

Ok so the last problem im facing is the one that i mentionned before, it feels like if the y axe is inverted


Seriously.   Please run the graphictest_kbv example as in #7.

Post photos of the Penguin screen Blue (portrait) and Green (landscape).

I can resolve problems very easily.  But only when I get accurate feedback.

The photo of the Blue shield is in Landscape_Rev and not Landscape.
Please attach the original youtuber.



May 31, 2018, 11:55 am Last Edit: May 31, 2018, 11:56 am by xeder
Hi again, when i tried to run the graphictest_kbv from the mcufriend library, it didnt work, but when i ran the graphictest from spfd5408 , this is what i got

PS: if you can please tell me how i can reverse the x-axis , because when i ran the tftpaint exemple, i found out that the x - axis is inverted , thank you sir


I am using IDE v1.8.1 and these are the system libraries that come with the IDE:
Code: [Select]

    Directory: C:\Program Files (x86)\Arduino-1.8.1\libraries

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        04-Feb-17     14:47                Adafruit_CircuitPlayground
d-----        04-Feb-17     14:47                Bridge
d-----        04-Feb-17     14:47                Esplora
d-----        04-Feb-17     14:47                Ethernet
d-----        04-Feb-17     14:47                Firmata
d-----        04-Feb-17     14:47                GSM
d-----        04-Feb-17     14:47                Keyboard
d-----        04-Feb-17     14:47                LiquidCrystal
d-----        04-Feb-17     14:47                Mouse
d-----        04-Feb-17     14:47                RobotIRremote
d-----        04-Feb-17     14:47                Robot_Control
d-----        04-Feb-17     14:47                Robot_Motor
d-----        04-Feb-17     14:47                SD
d-----        04-Feb-17     14:47                Servo
d-----        04-Feb-17     14:47                SpacebrewYun
d-----        04-Feb-17     14:47                Stepper
d-----        04-Feb-17     14:47                Temboo
d-----        04-Feb-17     14:47                TFT
d-----        04-Feb-17     14:47                WiFi

Any recent IDE version should be fine.   I think that v1.8.5 is the current Release.

If you have any third party libraries in this directory,   it is wise to delete them and install them properly with the Library Manager.
Seriously,   I can get you running within minutes if you follow instructions.

If you provide information I can help you.

Which SPFD5408 library are you using?
I can only find https://github.com/sadika9/TFTLCD-SPFD5408 through the Library Manager.

Its "graphictest" example performs the Adafruit Tests in Portrait_Rev  and then rotes the screen through Portrait_Rev, Landscape_Rev, Portrait, Landscape modes.    I ran it on a ILI9341.


Go Up