Drivers for 3.5" TFT LCD for arduino 2560 (ili9481)

Hi guys,

I’ve an display which has an inscription saying “3.5" TFTLCD for arduino 2560(ili9481)” and another inscription saying “4th Dimension innovations

It has been purchased from amazon from this link

I’ve tried different drivers like TFT_HX8357 and UTFT from mcufriend but both of them does not work.

I’m using it as an shield on Arduino Mega 2560 R3

When ever I try to Load the program the display remains blank with white color backlight

I’ve tried it by changing the UserSetup.h file of TFT_HX8357 and then using the library but nothing works.

Can you guys please help me make this work.

I’ve included both the libraries in the attachment for reference.

TFT_HX8357-master.zip (819 KB)

From the photos of the pcb in the Amazon link there are a total of 6 resistor packs.
Normally these pcb have 7 RP next to the 18x2 pins and 2 RP near the XPT2046.

This means the interface MUST be 8080-8 because you only have 4 RP for the TFT, SD

TFT_HX8357 and UTFT only support 8080-16

You should try MCUFRIEND_kbv with USE_SPECIAL USE_MEGA_8BIT_SHIELD and force ID=0x9481

David.

p.s. Ebay and Ali often post wrong pcb photos. I would expect Amazon to be equally mendacious.

Just wanted to say thank you.

I received a couple of 3.5" TFT's in the post this morning (ILI9486, 8 bit interface) - Plugged one into a Mega and the other into a Due. Initially had a white screen and some trouble working out the pin parameters to use but thanks to your post I'm all up & running now on both platforms.

For the benefit of other buyers, please post:

  1. link to display
  2. library used
  3. any configuration required.
  4. which platform e.g. Mega2560 or Due

David.

LCD was bought from ebay (not the cheapest seller but was supposed to be in the UK and ready to ship, not sure it was). These displays seem to be advertised all over the place.

https://www.ebay.co.uk/itm/3-5inch-TFT-Color-Screen-Module-320X480-Ultra-HD-LCD-Shield-forSPduino-UNO-SP/382361670729?ssPageName=STRK%3AMEBIDX%3AIT&var=651146617923&_trksid=p2057872.m2749.l2649

I tried the display on both a Due & a Mega - both worked ok with parameter as follows;

UTFTGLUE myGLCD(0x9486,A2,A1,A3,A4,A0);

Is the Adafruit GFX and UTFTGLUE combination the fastest way to drive this display for a Due? (I need a lot of speed in my project - I'm trying to create an FFT audio spectrum analyser so lots of number crunching and fast graphics I/O required).

I have another LCD display arriving soon;
https://www.ebay.co.uk/itm/3-2-tft-écran-couleur-module-320-x-480-écran-lcd-support-Arduino-Mega-2560/273035330087?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649
The controller IC used is supposed to be a HX8357B and this display has a16 bit interface - do you know which driver would be fastest for this? Bodmers'?

The Display in #4 is what I call a "Blue 3.5 inch Mcufriend".
These seem to come with ILI9481, ILI9486, HX8357-D controllers.

MCUFRIEND_kbv should work out of the box. What ID does it report?
The Due will be faster than Uno. Uno is faster than Mega.

UTFTGLUE ignores all of the dummy arguments.
It will read the ID and select the appropriate driver. e.g. ILI9481, ILI9486, HX8357-D

The Display in #5 is write-only. It used to come with HX8357-B but nowadays is ILI9481. The clue is written on the anti-static envelope when it arrives from China.
This will work fastest with Bodmer's HX8357_due library.
UTFT will work out of the box.
It will work with MCUFRIEND_kbv as a special on both Mega and Due.
i.e. USE_SPECIAL, USE_MEGA_16BIT_SHIELD

I strongly advise you to use GFX methods in a new program
Bodme's libraries use GFX methods.
Only use UTFTGLUE for a legacy program.

David.

Hi David,

So the 3.2" TFT arrived over the weekend (marked HX8357C) and I've had a play with the Bodmer grahics library and "Bodmer_UTFT_Demo_480x320" - all works perfectly.

When creating my own programs i'm seeing that the x-axis is inverted - re: physical orientation i.e. looking at the due/tft with the DC connector bottom left - X runs high values left to low values right. Y axis is Ok.

looks like X=0, y=0 is bottom right corner - is there a way to change this and invert X-axis only?

The Display in #4 is what I call a "Blue 3.5 inch Mcufriend for Uno".

Does your new display look like #4 or like #0 (for mega2560)

Was HX8357C printed on the virgin anti-static envelope?

If you have "Blue 3.5 inch Mcufriend" with HX8357C I will love you dearly.

Please post photo of the pcb or link to your new display.

David.

Hi David,

Sorry to say but the 3.5" MUCfriend displays I have (post #4) are ILI9486.

The 3.2" displays (post #5) are HX8357C (standard "banggood type displays I think).

I read a data sheet and was wondering about setting the Mx bit on to invert the x-axis on the display (not sure how to do this - need to access the MCU to Memory read/write direction control register).

Reading through Bodmers' driver I can see that there is already some inversion taking place in the initialisation section for the HX8357C.

regards
Jason

If your #5 Display said HX8357C on the sealed envelope, it should work with Bodmer's library. Select HX8357C in the User_Setup.h file.

Bodmer would have used the correct sequences for a HX8357C. I would expect it to be 100%

If you have a mirror issue you should describe it accurately. i.e.

  1. set Portrait mode
  2. print text
  3. look at screen with ribbon at the bottom.
  4. is text upside down or right to left?

It is easy to solve. Just give an accurate answer to (4)

David.

I missed this part;

"Select HX8357C in the User_Setup.h file."

Have now done that but now all the colours are inverted. It was previously set to HX8357B and there was no colour inversion.

I just reloaded/reran the "Bodmer_UTFT_Demo_480x320" sketch - I had to rotate the due/tft 180degrees but text is printing correctly so clearly I'm having one of those moments...

With the screen orientated correctly for the demo sketch above my bitmaps are loading upside down! (they were right way up on a ILI9486 display which is what has thrown me). I can rotate those and reload but i'll then need to also either invert the calculation of Y axis values (GFX has 0,0 in the top left corner, normal convention is bottom left).

Please follow my instructions in #10. Say which library. Say which problem.

It is always wise to relate everything to PORTRAIT mode. i.e.

tft.setRotation(0);

I will tell you how to correct for each library.

David.