HVGA 3.2 ILJ9481 problem

hi,

just bought the above display and seem to have an issue with using tft.fillScreen(TFT_BLACK)see pic, all other colours work fine with this function. Is this a duff display or have I overlooked something?

#include <TFT_HX8357.h> // Hardware-specific library

TFT_HX8357 tft = TFT_HX8357();       // Invoke custom library


void setup(void) {
  
  tft.init();
  tft.setRotation(1);
  tft.fillScreen(TFT_BLACK);
  
}


void loop() {
  

}

Oddly enough tft.fillRect(400,300,TFT_BLACK) sometimes works

TIA

Have you configured User_Setup.h for an ILI9481 ?

yes, I've done that

Different panels have different characteristics. Your screen may have inverted colours.
If TFT_GREEN appears as MAGENTA your colours are inverted.

tft.invertDisplay(1); //will invert the colours

If that solves your problem, I will show you how to configure automatically.

David.

No, all other colours are ok, it’s only black and it only happens when using fillScreen or fillRect(if over 0,0,300,300)

I just had to guess from your photo. Is it white? Is it grey? Is it some other colour?
Check that TFT_BLUE, TFT_RED, ... display correctly.

I don't think that TFT_HX8357 is available from the Library Manager.
Always install via the Manager if possible.

Otherwise download the library from the correct site i.e. Bodmer's repository on GitHub.
Install from ZIP.

David.

Its white at one end and then goes to striped grey at the other, yes all the other colours work fine everywhere and I have download the correct library and installed it.

Does it work with UTFT ?

TFT_BLACK, TFT_WHITE, TFT_GRAY, TFT_RED, … are all regular colours.
If there are any problems with Scan settings, Power, VCOM, Gamma, … they would be visible with all colours.

If you can post a readable photo of your screen, a reader might identify a problem.

David.

On a day like today that’s as good as I can get it. Doesn’t seem to want to display anything using UTFT. The second pic is of it running the meter demo from the example library which looks pretty much perfect

IMG_03451.jpg

So, no ideas anyone? I've found a work-around, if I redefine the value of TFT_BLACK to 0x0001 rather than 0x000 it works perfectly! which is good enough for me.

I suspect your board has a fault which means that at least one (probably all) of the 8 bit buffers on the back of the board is/are not getting any power from the power supply pin. When you send black, all data lines are at logic zero and the buffer eventually runs out of power as the decoupling capacitor gets depleted. The strobe line will be toggling with a 50% duty cycle so does not provide enough power.

When you set one of the colour bits high, this poor data pin has to provide enough current to keep the buffer circuit alive and the decoupling sufficienty charged.

Check you do not have a bent pin going into the Arduino board, check the solder joints on the board, it is probably a bad joint somewhere in the power feed connections to the buffers.

Arduino boards are quite tolerant of overloads on the data pins but the situation is stressing the processor chip.

It looks like a regular ready-made Mega shield. These tend to give VERY reliable connections.

That sounds like a good explanation. After all the "Meter" display looks 100% perfect. I assumed that all colours would behave the same.

David.

Thank you gentlemen, as far as I can I'll check the board over, strangely enough it's behaving itself today, so it's an intermittent fault. Bearing in mind the cost of these displays (£6 this was on ebay from china) it's irritating but hardly worth the effort in a trying to repair it or claim a replacement. You have confirmed what I was beginning to think that it was indeed faulty and not a software issue. I have also noticed that this screen is not as bright as my previous screen.