Problems with TFT 3.95", flashes and mirror ...

Hello, I have a TFT 3.95" has on the diagonal 100mm screen measures 83.5mm x 55.5mm and has 480x320 pixel, I have operated with ILI9481 and R61581 for libraries UTFT v.281 and I have operated with Adafruit_R61581_AS + Adrafruits_GFX_AS having the sources I need, but I have problems with flickering screen in the orientation that I put and I also go in any direction the characters mirror, I show pictures so you can see the problem, can anyone help me with this problem please?

With the sense of direction Value = 2 The display does not flash but the characters are mirrored, does anyone know how to fix it?

Thanks and regards.

Please post a link to the actual Ebay sale item that you have bought.
Or a photo of the pcb. i.e. it looks like a UNO shield to me.

If it is a Uno shield: Install and run the MCUFRIEND_kbv library.
This will detect whether you have got an ILI9481, ILI9486, ILI9488. And run 100%

The LCD_ID_readreg sketch could also tell me whether it is a R61581 or an HX8357.
These are unsupported but I could add them. (they are similar to an ILI9481)

It looks as if your Touch screen is smashed. So you have no hope of using Touch.

David.

Hello David, and thank you very much for your help.

The TFT have it mounted on a MEGA and yes, the touch is broken. :frowning:
but I want to use the TFT. ILI9488 puts on the plate but I did not find this library, I have not tried to ILI9488, I bought it on Aliexpress:

http://es.aliexpress.com/item/3-5-inch-TFT-LCD-screen-module-Mega-2560-R3-Mega2560-REV3-ATmega2560-16AU-Board-for/1683826472.html

You can not read registers on your Mega shield.

You might have ILI9488, ILI9481, R61581.

Write to bit#0 of MADCTL (0x36)
ILI9488: nothing
ILI9481: vertical flip
R61581: vertical flip

Write to bit#1 of MADCTL (0x36)
ILI9488: nothing
ILI9481: horizontal flip
R61581: nothing.

If you have an ILI9481, Rowboteer's library will work far better than UTFT.

David.

Hi David, yes with ILI9481 works 100%, but the sources of R61581 are what I need, nor has that of Rowboteer's ...

Do you think that the R61581 not work well?

I need big font seven segments of R61581 ... :frowning:

Seven segments is nothing to do with R61581. UTFT and Rowboteer can both render a big 7 segment font.

Did you try my diagnostic test of register 0x36 ?
Select the "best picture" controller model. Note the original 0x36 value. Then edit the 0x36 entry in the initlcd.h file to observe the behaviour when you change bits 0, 1.

Are you sure that you have the Renesas chip?

UTFT is a lottery. You can try the built-in models like ILI9481, R61581, ILI9486, ...
If you know which controller you actually have, it is simple to correct any specific physical panel differences.

David.

Hi David, I have edited the entry 0x36 and behaves the same as if I change the value in the instruction set. Rotation, I have tested with values of 1A, 2A, 4A and 8A. I don't know if the chip is Renesas, upload a photo of the back of the screen if your it can identify, I don't know. The R61581 library has a source of super large seven segments that need it and that I have not seen in other libraries such as the ILI9481 and others, I don't know what to do, I need a very large in seven segments source... :confused:

I suggest that you start with UTFT V2.81. Try the 3 different models that I mentioned.

If you are running in Portrait mode, note the problems and post them here.

Your OP just says that you have tried several libraries but give no report about which library does what.

Portrait mode will probably have 0x36 with values of 0x08, 0x09, 0x0A, 0x0B.
Report back with the differences between these values.

You definitely should NOT be trying values like 0x2A. This would be a Landscape mode.

David.

Yes I have thoroughly tested the 2.81 UTFT library and works 100% without problems but no big 7 segment.

I'll try these values to 0x36: 0x08, 0x09, 0x0A, 0x0B, I tested other values for I have seen on other information and did rotate the screen but does not eliminate the flicker, I need to eliminate flicker on the screen and use horizontal.

There are a whole range of Fonts available on the UTFT website.

I am pretty sure that v2.81 comes out of the box with a 7 segment font.

Yes, I am sure that you might want to use a Landscape orientation. It is more important to identify what controller you have first.

Then it is pretty straightforward to adjust any hardware settings if we know which controller. Or possibly suggest a better library for you.

David.

Yes, it does the v.2.81 have a font 7-segment but is small for what I need. How I can find the driver that takes this screen?

Basically what I want is to eliminate the flicker of screen, in the first three photos are brighter because the screen is blinking, the theme of characters in mirror I do have it solved, do not understand why flashes in the first three photos with the guidance they have and the last picture is not flashing but the characters appear in mirror and if I change the orientation the screen flashes...

I would be 100% certain that an Adafruit library that is written for a particular controller will work 100%.
I would be 95% certain that an UTFT library that is written for a particular controller will work 95%.

The UTFT library is well known and is easy to adapt for a different controller or physical panel.

If you are prepared to do some diagnostic work to determine the controller, I am happy to help.

Otherwise, I am out.

David.

OK, if you can help me find out which driver has the screen I am willing to do whatever you tell me, I hope to be able to understand you...

I hope your instructions.

Thank you very much for everything. :wink:

  1. Download and install a fresh copy of UTFT v2.81

  2. Run this sketch on your MEGA2560 for the three different controller models.

#include <UTFT.h>

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

UTFT myGLCD(ILI9481, 38, 39, 40, 41);
//UTFT myGLCD(ILI9486, 38, 39, 40, 41);
//UTFT myGLCD(R61581, 38, 39, 40, 41);

#define LCD_RD A0

void setup()
{
    pinMode(LCD_RD, OUTPUT);
    digitalWrite(LCD_RD, HIGH);
    //    myGLCD.InitLCD(LANDSCAPE);
    myGLCD.InitLCD(PORTRAIT);
    myGLCD.clrScr();
    myGLCD.setFont(BigFont);
}

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 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;
    for (i = 0; i < 8; i++) if (initval & (1<<i)) msgs[i][2] = '!';
    for (i = 0; i < 2; i++) {
        WriteCmdParamN(0x36, 1, &initval);
        myGLCD.clrScr();
        myGLCD.setColor(255, 255, 255);   //WHITE
        myGLCD.setFont(SevenSegNumFont);
        myGLCD.print("4", 0, 0);
        myGLCD.setFont(BigFont);
        myGLCD.print(msgs[i], 0, h / 2);
        delay(2000);
        myGLCD.clrScr();
        madctl = (1 << i) ^ initval;
        WriteCmdParamN(0x36, 1, &madctl);
        myGLCD.setColor(0, 0, 255);
        myGLCD.setFont(SevenSegNumFont);
        myGLCD.print("4", 0, 0);
        myGLCD.setFont(BigFont);
        myGLCD.print(msgs[i], 0, h / 2);
        delay(5000);
    }
}
  1. Report back with the results. i.e. write a table with result from each controller.

You should see a BLACK background with text in WHITE. The result of changing the bit in BLUE.
If the big number 4 changes place, you know that the Flip is working.

If your background is WHITE, or the text in RED, or MAGENTA, or YELLOW say so.

If you have trouble running the program, say so.

David.

OK, I try it on Monday and tell you how it went ...

Hello david.

I tested your program, the results are:

  • With ILI9481: The display is correct, the colors change from white to blue, the characters are in mirror 'Flip Hor' and 'Flip vert', the characters always mirror and do not change position.

  • With ILI9486: Single white screen.

  • With R61581: As with ILI9481.

I hope your stories. Thanks and regards.

Does the big 4 move?

Flip Horiz will make it go from Top Left Hand Corner to Top Right Hand Corner.
Flip Vertical will make it go from Top Left Hand Corner to Bottom Left Hand Corner.

It sounds like you have an ILI9481. So you just have to run all the UTFT examples with model=ILI9481.

I own an ILI9481 and an ILI9486.
I get a readable screen with each model test.

ILI9481:
myGLCD(ILI9481, ...)
Flip Vert: White 4 is at Top Left and correct. Blue 4 is Bottom Left and mirrored.
Flip Horiz: White 4 is at Top Left and correct. Blue 4 is Top Right and mirrored.
myGLCD(ILI9486, ...): white screen.
myGLCD(R6158I, ...)
Flip Vert: Black 4 is at Top Left and correct. Yellow 4 is Bottom Left and mirrored. streaky screen
Flip Horiz: Black 4 is at Top Left and correct. Yellow 4 is Top Right and mirrored. streaky screen

ILI9486:
myGLCD(ILI9481, ...)
Flip Vert: White 4 is at Top Right and mirrored. Blue 4 is Top Right and mirrored.
Flip Horiz: White 4 is at Top Right and mirrored. Blue 4 is Top Right and mirrored.
myGLCD(ILI9486, ...):
Flip Vert: White 4 is at Top Left and correct. Blue 4 is Top Left and no change.
Flip Horiz: White 4 is at Top Left and correct. Blue 4 is Top Left and no change.
myGLCD(R6158I, ...):
Flip Vert: White 4 is at Top Right and mirrored. Blue 4 is Top Right and mirrored.
Flip Horiz: White 4 is at Top Right and mirrored. Blue 4 is Top Right and mirrored.

Since you seem to have an ILI9481, you could try Rowboteer's HX8357/ILI9481 library.
This should be a lot quicker than UTFT.

David.

Hello David, the number 4 in the example does not move in the same place, only changes color, that's the font I need but more larger, twice the size ...