Correct library for my screen

Good day everyone,

Please could someone point me in the right direction?
I have a 3.2 inch screen which I've been using for my relay system on a Mega2560, see attached picture of the screen.
Since I started using it I've always used UTFT.h, and myGLCD(CTE32HR, 38, 39, 40, 41);
It has always worked great to let me create my menus with different fonts etc.
The only issue I am having is that the colours seem inverted, and I cant seem to adjust the back light brightness, it's always white. I cant change the background color either. I have tried the online manual on the RinkyDink Electronics website for UTFU.h libraries, but nothing I do is working.

Can anyone tell me which is the correct library for this screen, or what I am doing wrong?

Thank you

Yes, I can see it is a common Mega2560 shield from the photo. They commonly have HX8357B, HX8357C, HX8357D, ILI9481, R61581 and sometimes ILI9486.

It is always better to post a link to the actual item that you have bought. e.g. Ebay sale page.

The sale page often says which controller is mounted.
But the best evidence is from the printed label on the antistatic bag that the Shield came in.

Please provide the controller part number. Then we can advise for UTFT.
We can even tell you the appropriate Gobbledygook model name.

David.

david_prentice:
Yes, I can see it is a common Mega2560 shield from the photo. They commonly have HX8357B, HX8357C, HX8357D, ILI9481, R61581 and sometimes ILI9486.

It is always better to post a link to the actual item that you have bought. e.g. Ebay sale page.

The sale page often says which controller is mounted.
But the best evidence is from the printed label on the antistatic bag that the Shield came in.

Please provide the controller part number. Then we can advise for UTFT.
We can even tell you the appropriate Gobbledygook model name.

David.

Hi David,
Thank you for your reply.
Unfortunately I do not have the add from the original purchase anymore, it was done 3 years ago and I've lost the information. I had a look at the antistatic bag and the label is very faded, but I could manage to see that it says ILI9481.
Does this mean that I'm using the incorrect controller part?

I had a look at the antistatic bag and the label is very faded, but I could manage to see that it says ILI9481.

From UTFT.h

...
#define ILI9481			21
...
#define CTE32HR			21	// ILI9481	(16bit)
...

So you are doing everything correctly. You can use either:

UTFT myGLCD(ILI9481, 38, 39, 40, 41);  //informative constructor statement
UTFT myGLCD(CTE32HR, 38, 39, 40, 41);  //gobbledygook version

I suggest that you re-install UTFT. Run the library examples.

If you still get inverted colours it suggests that your ILI9481 is unwell.
UTFT does not have a method for inverting colours but I can show you what to alter in ILI9481/initlcd.h

I suspect that you have inadvertently edited your UTFT or sketch. A fresh install will make it factory-fresh.

David.

david_prentice:
From UTFT.h

...

#define ILI9481 21
...
#define CTE32HR 21 // ILI9481 (16bit)
...



So you are doing everything correctly. You can use either:


UTFT myGLCD(ILI9481, 38, 39, 40, 41);  //informative constructor statement
UTFT myGLCD(CTE32HR, 38, 39, 40, 41);  //gobbledygook version




I suggest that you re-install UTFT. Run the library examples.

If you still get inverted colours it suggests that your ILI9481 is unwell.
UTFT does not have a method for inverting colours but I can show you what to alter in ILI9481/initlcd.h

I suspect that you have inadvertently edited your UTFT or sketch. A fresh install will make it factory-fresh.

David.

Hi David,
Thanks again.
I tried your suggestion of deleting utft and reinstalling it from the latest RinkyDink utft.zip file. Still no change.
I also tried to run some of the examples from the .zip file and the screen still has the white background.
The screen is white as soon as you power up the Arduino, so I think you're right in saying that there's a hardware problem, it's almost like it doesn't even get to the code yet. I'm going to have to try find another one of these screens to test.

If every pixel is being clearly displayed your controller is worth saving.

Edit ili9481/initlcd.h
from:

	LCD_Write_COM(0xC0);
	LCD_Write_DATA(0x10);
	LCD_Write_DATA(0x3B);
	LCD_Write_DATA(0x00);
	LCD_Write_DATA(0x02);
	LCD_Write_DATA(0x11);

Change to

	LCD_Write_COM(0xB0);   //unlocks Manufacturer registers
	LCD_Write_DATA(0x00);

	LCD_Write_COM(0xC0);
	LCD_Write_DATA(0x00);  //changes inversion
	LCD_Write_DATA(0x3B);
	LCD_Write_DATA(0x00);
	LCD_Write_DATA(0x02);
	LCD_Write_DATA(0x11);

Edit. Added optional unlock statements

david_prentice:
If every pixel is being clearly displayed your controller is worth saving.

Edit ili9481/initlcd.h
from:

	LCD_Write_COM(0xC0);
LCD_Write_DATA(0x10);
LCD_Write_DATA(0x3B);
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x02);
LCD_Write_DATA(0x11);


Change to


LCD_Write_COM(0xC0);
LCD_Write_DATA(0x00);  //changes inversion
LCD_Write_DATA(0x3B);
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x02);
LCD_Write_DATA(0x11);

Did the change in initlcd.h, still no change, sorry.

david_prentice:
If every pixel is being clearly displayed your controller is worth saving.

Edit ili9481/initlcd.h
from:

	LCD_Write_COM(0xC0);
LCD_Write_DATA(0x10);
LCD_Write_DATA(0x3B);
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x02);
LCD_Write_DATA(0x11);


Change to


LCD_Write_COM(0xC0);
LCD_Write_DATA(0x00);  //changes inversion
LCD_Write_DATA(0x3B);
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x02);
LCD_Write_DATA(0x11);

I also tried another screen and it does the same.
This is part of the code that I use, there is some more where I make menus, but can you see any mistakes when I start the script?

// Codes
#include <UTFT.h>
#include <Keypad.h>

// TFT and Fonts
UTFT myGLCD(ILI9481, 38, 39, 40, 41);
extern uint8_t BigFont[];
extern uint8_t Grotesk32x64[];

This is just a intro "Splash Screen", that's the first time the screen comes on.

 // Intro screen
  myGLCD.InitLCD();
  myGLCD.clrScr();
  myGLCD.setFont(Grotesk32x64);
  myGLCD.setColor(VGA_BLUE);
  myGLCD.print((char*)"AB Catalyst", CENTER, 100);
  myGLCD.print((char*)"TREATMENT", CENTER, 164);
  delay (2000);
  myGLCD.clrScr();
  myGLCD.setColor (255, 0, 0);
  for (int i = 1; i < 319; i += 5)
  {
    myGLCD.drawLine(1, i, (i * 1.6) - 10, 319);
  }
  myGLCD.setColor (255, 0, 0);
  for (int i = 319; i > 1; i -= 5)
  {
    myGLCD.drawLine(478, i, (i * 1.6) - 11, 1);
  }
  myGLCD.setColor (0, 255, 255);
  for (int i = 319; i > 1; i -= 5)
  {
    myGLCD.drawLine(1, i, 491 - (i * 1.6), 1);
  }
  myGLCD.setColor (0, 255, 255);
  for (int i = 1; i < 319; i += 5)
  {
    myGLCD.drawLine(478, i, 490 - (i * 1.6), 319);
  }
  for (int i = 0; i < 10000; i++)
  {
    myGLCD.setColor(random(255), random(255), random(255));
    myGLCD.drawPixel(2 + random(479), 16 + random(319));
  }
  myGLCD.clrScr();
Splash();
}

These are the other menus,

void Splash() {
  myGLCD.setColor(VGA_BLUE);
  myGLCD.drawRect(0, 0, 479, 319);
  myGLCD.drawLine(1, 19, 478, 19);
  myGLCD.setFont(BigFont);
  myGLCD.print((char*)"AB Catalyst", CENTER, 2);
  myGLCD.setColor(VGA_WHITE);
  myGLCD.print((char*)"'Press 'A' - Statistics'", 1, 100);
  myGLCD.print((char*)"'Press 'B' - Delay Setup'", 1, 116);
  myGLCD.print((char*)"'Press 'C' - Blow Setup'", 1, 132);
  myGLCD.print((char*)"'Press 'D' - Examples Page'", 1, 148);
  myGLCD.setColor(VGA_GRAY);
  myGLCD.print((char*)"Serial#", 288, 302);
  myGLCD.printNumI(serialNum, 405, 302);
}

void title() {
  CurrentMode = TitleMode;
  myGLCD.clrScr();
  myGLCD.setColor(VGA_BLUE);
  myGLCD.drawRect(0, 0, 479, 319);
  myGLCD.drawLine(1, 19, 478, 19);
  myGLCD.setFont(BigFont);
  myGLCD.print((char*)"AB Catalyst", CENTER, 2);
  myGLCD.setColor(VGA_WHITE);
  myGLCD.print((char*)"Delay Between Blows :", 2, 48); //Delay time
  myGLCD.printNumI(offTime, 337, 48);
  myGLCD.print((char*)"ms", 435, 48);
  myGLCD.print((char*)"Length of Each Blow :", 2, 64); //Blow time
  myGLCD.printNumI(onTime, 337, 64);
  myGLCD.print((char*)"s", 402, 64);
  myGLCD.print((char*)"System Active For :", 2, 80); //Active Days
  myGLCD.printNumI(activeDays, 305, 80);
  myGLCD.print((char*)"Days", 355, 80);
  myGLCD.print((char*)"System Active For :", 2, 96); //Active Hours
  myGLCD.printNumI(activeHours, 305, 96);
  myGLCD.print((char*)"Hours", 355, 96);
  myGLCD.print((char*)"Number of Blows :", 2, 112); //Blows
  myGLCD.printNumI(blows, 274 , 112);
  myGLCD.print((char*)"KGs powder used :", 2, 128); //KGs used
  myGLCD.printNumI(powderUsed, 274, 128);
  myGLCD.setColor(VGA_RED);
  myGLCD.print((char*)"'Press 'A' - Update Stats'", 1, 150);
  myGLCD.print((char*)"'Press 'B' - Delay Setup'", 1, 166);
  myGLCD.print((char*)"'Press 'C' - Blow Setup'", 1, 182);
  myGLCD.print((char*)"'Press 'D' - Examples Page'", 1, 198);
  myGLCD.setColor(VGA_GRAY);
  myGLCD.print((char*)"Serial#", 288, 302);
  myGLCD.printNumI(serialNum, 405, 302);
}

void offTimeChange() {
  myGLCD.clrScr();
  myGLCD.setColor(VGA_BLUE);
  myGLCD.drawRect(0, 0, 479, 319);
  myGLCD.drawLine(1, 19, 478, 19);
  myGLCD.setFont(BigFont);
  myGLCD.print((char*)"AB Catalyst", CENTER, 2);
  myGLCD.setColor(VGA_WHITE);
  myGLCD.print((char*)"CHANGE BLOW DELAY TIME", CENTER, 34);
  myGLCD.print((char*)"IN MILLISECONDS", CENTER, 50);
  myGLCD.print((char*)"ENTER VALUE", CENTER, 66);
  myGLCD.print((char*)"PRESS # TO SAVE", CENTER, 102);
  myGLCD.print((char*)"PRESS * TO CANCEL", CENTER, 118);
  myGLCD.setColor(VGA_RED);
  myGLCD.print((char*)"'Press 'A' - Statistics'", 1, 146);
  myGLCD.print((char*)"'Press 'C' - Blow Setup'", 1, 162);
  myGLCD.print((char*)"'Press 'D' - Examples Page'", 1, 178);
  myGLCD.setColor(VGA_GRAY);
  myGLCD.print((char*)"Serial#", 288, 302);
  myGLCD.printNumI(serialNum, 405, 302);
}

void onTimeChange() {
  myGLCD.clrScr();
  myGLCD.setColor(VGA_BLUE);
  myGLCD.drawRect(0, 0, 479, 319);
  myGLCD.drawLine(1, 19, 478, 19);
  myGLCD.setFont(BigFont);
  myGLCD.print((char*)"AB Catalyst", CENTER, 2);
  myGLCD.setColor(VGA_WHITE);
  myGLCD.print((char*)"CHANGE LENGTH OF BLOW TIME", CENTER, 50);
  myGLCD.print((char*)"ENTER VALUE", CENTER, 66);
  myGLCD.print((char*)"PRESS # TO SAVE", CENTER, 102);
  myGLCD.print((char*)"PRESS * TO CANCEL", CENTER, 118);
  myGLCD.setColor(VGA_RED);
  myGLCD.print((char*)"'Press 'A' - Statistics'", 1, 146);
  myGLCD.print((char*)"'Press 'B' - Delay Setup'", 1, 162);
  myGLCD.print((char*)"'Press 'D' - Examples Page'", 1, 178);
  myGLCD.setColor(VGA_GRAY);
  myGLCD.print((char*)"Serial#", 288, 302);
  myGLCD.printNumI(serialNum, 405, 302);
}

void offTimeSaved() {
  myGLCD.clrScr();
  myGLCD.setColor(VGA_BLUE);
  myGLCD.drawRect(0, 0, 479, 319);
  myGLCD.drawLine(1, 19, 478, 19);
  myGLCD.setFont(BigFont);
  myGLCD.print((char*)"AB Catalyst", CENTER, 2);
  myGLCD.setColor(VGA_WHITE);
  myGLCD.print((char*)"LENGTH OF DELAY TIME SAVED", CENTER, 50);
  myGLCD.print((char*)"DELAY TIME NOW", CENTER, 66);
  myGLCD.setColor(VGA_RED);
  myGLCD.printNumI(offTime, CENTER, 82);
  pressedKeyCount = 0,
  delay (3000);
  title();
}

void onTimeSaved() {
  myGLCD.clrScr();
  myGLCD.setColor(VGA_BLUE);
  myGLCD.drawRect(0, 0, 479, 319);
  myGLCD.drawLine(1, 19, 478, 19);
  myGLCD.setFont(BigFont);
  myGLCD.print((char*)"AB Catalyst", CENTER, 2);
  myGLCD.setColor(VGA_WHITE);
  myGLCD.print((char*)"LENGTH OF BLOW TIME SAVED", CENTER, 50);
  myGLCD.print((char*)"BLOW TIME NOW", CENTER, 66);
  myGLCD.setColor(VGA_RED);
  myGLCD.printNumI(onTime, CENTER, 82);
  pressedKeyCount = 0,
  delay (3000);
  title();
}

void reset() {
  myGLCD.clrScr();
  myGLCD.setColor(VGA_BLUE);
  myGLCD.drawRect(0, 0, 479, 319);
  myGLCD.drawLine(1, 19, 478, 19);
  myGLCD.setFont(BigFont);
  myGLCD.print((char*)"AB Catalyst", CENTER, 2);
  myGLCD.setColor(VGA_WHITE);
  myGLCD.print((char*)"NO CHANGES HAVE BEEN SAVED", CENTER, 50);
  delay (2000);
  myGLCD.clrScr();
  title();
}

void tooManyNumbers() {
  myGLCD.clrScr();
  myGLCD.setColor(VGA_BLUE);
  myGLCD.drawRect(0, 0, 479, 319);
  myGLCD.drawLine(1, 19, 478, 19);
  myGLCD.setFont(BigFont);
  myGLCD.print((char*)"AB Catalyst", CENTER, 2);
  myGLCD.setColor(VGA_WHITE);
  myGLCD.print((char*)"TOO MANY DIGITS ENTERED", CENTER, 50);
  myGLCD.print((char*)"PLEASE CHOOSE MENU AGAIN", CENTER, 68);
  myGLCD.print((char*)"AND RE-ENTER NEW TIME", CENTER, 86);
  delay (3000);
  myGLCD.clrScr();
  title();
}

You should always run the library example sketches first.

There is no point in looking at your custom sketch until I know whether the examples are correct.
i.e. without and with the edit in #5

I have added an extra two lines to #5.
You can tell me if they make a difference.

David.

I tried it by adding the two extra lines

        LCD_Write_COM(0xB0);[color=#222222][/color]
	LCD_Write_DATA(0x00);[color=#222222][/color]
[color=#222222][/color]
	LCD_Write_COM(0xC0);[color=#222222][/color]
	LCD_Write_DATA(0x00);[color=#222222][/color]
	LCD_Write_DATA(0x3B);[color=#222222][/color]
	LCD_Write_DATA(0x00);[color=#222222][/color]
	LCD_Write_DATA(0x02);[color=#222222][/color]
	LCD_Write_DATA(0x11);

I tried it without the two extra lines,

        LCD_Write_COM(0xC0);[color=#222222][/color]
	LCD_Write_DATA(0x00);[color=#222222][/color]
	LCD_Write_DATA(0x3B);[color=#222222][/color]
	LCD_Write_DATA(0x00);[color=#222222][/color]
	LCD_Write_DATA(0x02);[color=#222222][/color]
	LCD_Write_DATA(0x11);

Also tried it by adding the extra lines and changing the other entry back to the original,

        LCD_Write_COM(0xB0);[color=#222222][/color]
	LCD_Write_DATA(0x00);[color=#222222][/color]
[color=#222222][/color]
	LCD_Write_COM(0xC0);[color=#222222][/color]
	LCD_Write_DATA(0x10);[color=#222222][/color]
	LCD_Write_DATA(0x3B);[color=#222222][/color]
	LCD_Write_DATA(0x00);[color=#222222][/color]
	LCD_Write_DATA(0x02);[color=#222222][/color]
	LCD_Write_DATA(0x11);

and I tried it again without any changes to the initlcd.h file.

        LCD_Write_COM(0xC0);[color=#222222][/color]
	LCD_Write_DATA(0x10);
        LCD_Write_DATA(0x3B);[color=#222222][/color]
	LCD_Write_DATA(0x00);[color=#222222][/color]
	LCD_Write_DATA(0x02);[color=#222222][/color]
	LCD_Write_DATA(0x11);

This was all tested on a UTFT demo example. (The one with moving graphs, circles and squares)

Sorry, that last reply came out very confusing.
I tried all the options with an example and it still didn't work.

You know it is ILI9481 and you have edited your copy of
C:\Users\David Prentice\Documents\Arduino\libraries\UTFT\tft_drivers\ili9481\initlcd.h

Do you have multiple UTFT installations?
It should be a single installation in C:\Users\LanceRoberts\Documents\Arduino\libraries\

You have not answered:

If every pixel is being clearly displayed your controller is worth saving.

I could suggest several diagnostics to check for a (genuine healthy) ILI9481.
But if I don't know whether it is good pixels but inverted colours or whether you have no picture at all (White Screen)

reg(0xC0) controls the colour inversion, vertical mirroring, and several other things.

Changing the REV (bit4) should invert / normal
Changing the GS (bit2) should change the vertical direction in Portrait mode. (horiz in Landscape)
Changing the SM (bit3) should interlace / normal

If there is no response to altering REV or GS this means your ILI9481 is unwell. (or the printed label is wrong)

David.

Hi David,

You know it is ILI9481 and you have edited your copy of[color=#222222][/color]
C:\Users\David Prentice\Documents\Arduino\libraries\UTFT\tft_drivers\ili9481\initlcd.h

As far as I can see it is a ILI9481, unless the packaging label is incorrect...

Do you have multiple UTFT installations?[color=#222222][/color]
It should be a single installation in C:\Users\LanceRoberts\Documents\Arduino\libraries\

There is only one UTFT installation in my libraries directory, and just by the way I'm working on a Mac, so the folder structure is a little bit different. I did however find the correct folder and edited the file in there.

If every pixel is being clearly displayed your controller is worth saving.

I would love to save the screen if possible, all the pixels are working, which is why I think it's an issue with the backlight, or the screen being inverted. That's the frustrating thing at the moment. I've tested one other screen and it's doing the same. My menus do show up, but the font color is wrong, as well as the splash screen which I have is incorrect colour on top of a white background.

(or the printed label is wrong)

Starting to think this is the problem maybe. Is there any way of checking what it would actually be?

If ILI9481 is printed on the label you have an ILI9481.
If ILI9486 is printed then ILI9481 register writes would not be applicable.

You can just use the regular MIPI user command to invert the screen in setup() after myGLCD.init() statement

    digitalWrite(40, LOW);  // CS enable
    myGLCD.LCD_Write_COM(0x21); //INVON invert screen
    //myGLCD.LCD_Write_COM(0x20); //INVOFF normal screen
    digitalWrite(40, HIGH);  // CS disable

David.

david_prentice:
If ILI9481 is printed on the label you have an ILI9481.
If ILI9486 is printed then ILI9481 register writes would not be applicable.

You can just use the regular MIPI user command to invert the screen in setup() after myGLCD.init() statement

    digitalWrite(40, LOW);  // CS enable

myGLCD.LCD_Write_COM(0x21); //INVON invert screen
   //myGLCD.LCD_Write_COM(0x20); //INVOFF normal screen
   digitalWrite(40, HIGH);  // CS disable




David.

Thank you David, I will give that a shot and let you know what happens.
Appreciate it.

david_prentice:
If ILI9481 is printed on the label you have an ILI9481.
If ILI9486 is printed then ILI9481 register writes would not be applicable.

You can just use the regular MIPI user command to invert the screen in setup() after myGLCD.init() statement

    digitalWrite(40, LOW);  // CS enable

myGLCD.LCD_Write_COM(0x21); //INVON invert screen
   //myGLCD.LCD_Write_COM(0x20); //INVOFF normal screen
   digitalWrite(40, HIGH);  // CS disable




David.

David, you sir are a legend!!! That worked perfectly, all the colours are back and working 100%.
Thank you very much for your patience and help with this, I truly appreciate it.

Please run this program. Take notes on paper.

#include <UTFT.h>

// Declare which fonts we will be using
extern uint8_t BigFont[], SmallFont[];
extern uint8_t SevenSegNumFont[];

//UTFT myGLCD(model,RS,WR,CS,RST,[ALE]);  //assumes that nRD is tied high
UTFT myGLCD(ILI9481, 38, 39, 40, 41);  //>>> TRY EACH CONSTRUCTOR IN TURN <<<
//UTFT myGLCD(ILI9486, 38, 39, 40, 41);
//UTFT myGLCD(R61581, 38, 39, 40, 41);

#define TFT_WHITE 0xFFFF
#define TFT_BLACK 0x0000
#define TFT_BLUE  0x001F

void setup()
{
    myGLCD.InitLCD(PORTRAIT);
    myGLCD.clrScr();
}

void WriteCmdParamN(uint16_t cmd, int8_t N, uint8_t *block)
{
    cbi(myGLCD.P_CS, myGLCD.B_CS);
    myGLCD.LCD_Write_COM(cmd);
    while (N-- > 0) {
        myGLCD.LCD_Write_DATA(*block++);
    }
    sbi(myGLCD.P_CS, myGLCD.B_CS);
}

char *msgs[] = {
    "0: Flip Vert",
    "1: Flip Horiz",
    "2: Horiz refresh",
    "3: RGB-BGR order",
    "4: Vert refresh",
    "5: Row Col Xchange",
    "6: Column Order",
    "7: Row Order",
};

void pic(int w, int h, uint16_t color, char *msg, int xx, int yy)
{
    myGLCD.clrScr();
    myGLCD.setColor(color);
    myGLCD.drawRect(0, 0, w - 1, h - 1);
    myGLCD.drawRect(xx, yy, w - xx - 1, h - yy - 1);
    myGLCD.setFont(SmallFont);
    myGLCD.print("TOP",  xx + 2, yy / 2);
    myGLCD.print("BOTTOM",  xx + 2, h - yy / 2);
    myGLCD.setFont(SevenSegNumFont);
    myGLCD.print("4", xx, yy);
    myGLCD.setFont(SmallFont);
    myGLCD.print(msg, xx + 2, h / 2);
}

void loop()
{
    uint8_t initval = 0x0A;     //what is in your initlcd.h for 0x36

    int w = myGLCD.getDisplayXSize(), h = myGLCD.getDisplayYSize();
    uint8_t i = 0, madctl;
    WriteCmdParamN(0x20, 0, &madctl);  //INVOFF >>>select for BLACK background<<<
    //    WriteCmdParamN(0x21, 0, &madctl);  //INVON
    for (i = 0; i < 8; i++) if (initval & (1 << i)) msgs[i][2] = '!';
    for (i = 0; i < 8; i++) {
        WriteCmdParamN(0x36, 1, &initval);
        pic(w, h, TFT_WHITE, msgs[i], 32, 32);
        delay(2000);
        madctl = (1 << i) ^ initval;
        WriteCmdParamN(0x36, 1, &madctl);
        pic(w, h, TFT_BLUE, msgs[i], 32, 32);
        delay(5000);
    }
}

Select the appropriate constructor.
If you don't get a BLACK background, change the INVON / INVOFF statement in loop()

A genuine ILI9481 should respond to "Flip Vert and Flip Horiz"
A genuine ILI9486 will NOT respond to "Flip Vert and Flip Horiz"
A genuine R61581 should respond to "Flip Vert" but NOT respond to "RGB-BGR Order"

David.

Hi David,

A few months ago you helped me with an issue that I had on a screen that had the colours inverted. Thank you for that.
Unfortunately I could not get the same model of screen again, and now I'm sitting with an issue where the characters are mirrored, and I cant for the life of me figure out why. I'm using the same uTFT library, and there doesn't seem to be a flip/mirror command, or anything that helps.

Any advice?
The screen comes on using the ILI9481driver, as well as CTE32HR. The add online says its a HX8357B, but the library doesn't include that driver.

Your help would be greatly appreciated.

If your screen pcb looks like the photos in #1 you might have ILI9481, HX8357D, R61581.

If your new screen has a different pcb, please post a new photo.

Run the sketch from #17. Take notes on paper. Report back.
I will tell you which controller you probably have.
And what edits to make it work with UTFT.

David.

Thanks for the quick reply David, much appreciated.
See attached picture of the pcb,


I will run the sketch and get to you shortly, just stepping out of the office for an hour or two.