Fast library for Due and low cost HX8357B/C and ILI9481 480 x 320 displays

@vagos21

I had another look at the eBay link you provided. The vendor has included images of 3 slightly different display boards! That does not bode well…

This is a “suck it and see” approach but try the libraries attached and run the graphicstest_R61581 example. They are for a different controller and 3.6" 400 x 240 pixel 16 bit display, but once we get something displayed we can start to figure out what is happening.

TFT_400x240.zip (51.3 KB)

Hello again, testing that library too made no difference, here is the lcd i eventually got, if it makes any sense:

front back

and here are the 3 links i got from the seller as drivers/schematics: http://osoyoo.com/driver/3.5LCD_ili9481.rar http://osoyoo.com/driver/3.5LCD_ili9488.rar http://www.mcufriend.com/down/pdf/3.52560sch.pdf

i couln't get the 9488 to compile, a bunch of "not declared" errors

I never cease to be amazed!

If the item in your hand does not match the photos in your Ebay link, say so. Likewise, if the schematic in your link does not match the pcb.

I am especially concerned about R1, R2, RP7 and their routing to digital #43 pin and 3V3. But mostly because you don't have an R2 or RP7 on your pcb photo.

I suspect that you might have an 8-bit interface rather than 16-bit. Follow the pcb traces to digital#22 - 29. Do you actually have traces from digital #30-37 ?

If we knew your schematic, I probably already support you. I suggest you get tracing what you actually have in your hands. If you do not know how to use a DMM to follow the traces, just buy a new shield.

David.

@vagos21

I suggest you contact the seller and ask for a refund. I have not had any problems getting refunds from Chinese vendors. If you bought with a Mega or Due clone then just ask for a refund for the display.

The schematic does not tie up with what you have and the libraries provided are not much help and are in a bit of a hacked state.

Like David, I think you have an 8 bit display but it also like the control pins do not map to the ones I use in my libraries so that is probably why you just get the white screen. I find that any 16 bit library seems to display something when the control and data pins are mapped correctly even though the images do not look correct.

I don't have any recommendation for a touch screen display to use with a Due. David may be able to suggest one.

Any screen with a Touch Screen Controller chip should work with the Due. e.g. XPT2046, ADS7843, ... There are several libraries available.

A basic Resistive Touch Panel (as on cheap 2.4" Mcufriend shields) is a bit tough for the Due to drive. The X tends to be about 300R. That is 11mA from the Due's wimpy GPIO pins.

The Mega shields tend to come with a XPT2046. The "good value" ILI9481/HX8537 shields do not have a Touch panel.

The 2.4" ILI9341 red SPI "Touch" modules do not always have the XPT2046 mounted.

See if you can guess the schematic and post it here. i.e. which digital #pins connect to which resistor pack. Otherwise, just ask for your money back.

David.

I'm finally back, this is what i got from tracing the board, i got the arduino pinouts written on the side. you were right, it looks like this one's 8bit...

pinouts

so the schematic is quite close apart from being 8bit? do we have a chance to make it work or will i have to smash it against the wall? lol... could the lcd itself be damaged? this one has the XPT2046 on it.

Install my MCUFRIEND_kbv library. I will PM you with the necessary instructions.

David.

i had a hunch about this, so i had just done that before coming back to read your reply :) waiting for the PM

@vagos21

Great job at mapping the pins, very clear. This confirms an 8 bit interface.

The HX8357_Due library has an 8 bit mode but the data and control pins are mapped for the UNO shield and thus this option will not work with your shield.

It would be possible to add an option to support your shield but I have some other paid for tasks to do in the next few weeks. I will add it to my Arduino "to do" list!

David's library works well and will get you up and running.

Hi Bodmer,

I downloaded your library for HX8357B driver and tried it on setup - Arduino Due R3 & TFT 3.2’ LCD 480x320 display. I have a little problem in this case. Look at 2 pictures taken from examples (they are in attachment).

While using your examples I found single pixels white pixels in random locations. Additionally, while displaying numbers or letters, part of them is moved to another side of display area.

The only one example which works correctly is “Mandlebrot” projekt. Displaying is really slow but final effect is free of defects.

It’s the first time when i try something with TFT display. Personally i think that could be a problem with frequency or transition speed but most probably im wrong.

What do you think about this issue? Could you help me to solve this problem?

Krzaqu

@Krzaqu

You have a display with ILI9481 driver. You need to edit the "User_Setup.h" file inside the library folder to select that display. The configuration lines should then look like this:

//#define HX8357B //#define HX8357C

define ILI9481

//#define ILI9481_8BIT

Notice the options are all commented out with // but one.

This will correct the mirroring and the display corruption.

@bodmer

Problem is solved. Looks like there is a mistake in description on auction where i bought the display. Thank you very much for tour help!

Krzaqu

It is always wise to post a link to your actual item. e.g. the Ebay sale. It is also wise to compare every photo and description on the link with the item that you actually received.

Just doing this will often means that you are given a full answer to any problem. Frequently solved in the first reply.

David.

david_prentice: Install my MCUFRIEND_kbv library. I will PM you with the necessary instructions.

David.

Hi,

Any news about the 'unknown' TFT? It seems I also have the same TFT here in my stock and don't get it working. Sometimes some minor flashes but most time nothing.

Harry

No, vagos21 did not have much success. I am still waiting for him to say what ID is reported to the Serial Terminal.

I think he is going to ask for his money back.

It should be very straightforward to get an 8-bit Mega Shield working. If I could be sure to receive the same shield, I would buy one for myself. If it was on my desk it would be easy.

Unfortunately Ebay vendors operate a lottery system. You never know what you will actually get. Does your Shield match vagos21's excellent photo in message #45 ?

David.

david_prentice: No, vagos21 did not have much success. I am still waiting for him to say what ID is reported to the Serial Terminal.

I think he is going to ask for his money back.

It should be very straightforward to get an 8-bit Mega Shield working. If I could be sure to receive the same shield, I would buy one for myself. If it was on my desk it would be easy.

Unfortunately Ebay vendors operate a lottery system. You never know what you will actually get. Does your Shield match vagos21's excellent photo in message #45 ?

David.

Looks exactly the same, also without the text mcufriend.com but the text 4th Dimension Innovations

Harry

Where are you?

Where did your screen come from?

David.

david_prentice: Where are you?

Where did your screen come from?

David.

I'm from the Netherlands, bought the display on ebay from a Chinese supplier, ordered more from different suplliers so I have to look which one it was... The only thing I remember was that on the pictures in the add there was the text mcufriend.com on the silkscreen so a change of name of the Chinese company or...?

Harry

Please identify your board. And provide a link to an accurate photo of the pcb. E.g. does it match the "pinout" photo in message #45?

I can PM you instructions. If you are prepared to do the testing.

David.

david_prentice: Please identify your board. And provide a link to an accurate photo of the pcb. E.g. does it match the "pinout" photo in message #45?

I can PM you instructions. If you are prepared to do the testing.

David.

Hi David,

I compared the board yesterday with the board on the pictures, looks exactly the same. Of course I can do some tests when you send me the instructions. Thanks in advance.

Harry