problem with HX8357D based TFT LCD

Hi

I have purchased this TFT LCD :

https://www.aliexpress.com/item/IPS-3-2-inch-HD-SPI-TFT-LCD-RGB-Screen-with-Adapter-Board-HX8357-Drive-IC/32865559817.html

but i cant find any library for it, it is based on HX8357D and the problem is that it does not have a

"D/C" PIN to use a related Adafruit library, the strange thing is that when i connect the 3.3 V and ground pin to LCD, the back light does not turn on and if the back of board is touched with my fingers, it flashes randomly, and i doubt if its damaged or not.

I use a "Due" board with it because of 3.3 v but i also have a "UNO" board.

So any information about any related library or any piece of simple code that show something on it is appreciated.

Thanks.

The display should be fine with 3.3V logic from a Due.
Do not ever connect it to a 5V Uno.

The photo shows the board configured for IM# = 001 i.e. 8080-9 interface

I would select 8080-8 or 8080-16 parallel interface. But actually the SPI interface would be more attractive to me.

Bodmer's TFT_HX8357 library should work with the 8080-16 interface.
My MCUFRIEND_kbv library should work with both 8080-8 interface. (8080-16 as a SPECIAL)

Note that your header requires careful manual wiring to the Due (or other 3.3V Arduino).

Most displays are White when inactive. HX8357 displays are Black when inactive.

David.

Edit. IM# has only got 3 bits: IM2, IM1, IM0

Dear David

thank you for the fast reply, i checked the Bodmer's TFT_HX8357 library but in the readme file it is said that the library works for HX8357B and HX8357C, not for the HX8357D, are you sure that it work on this chip?
and could you please help me to configure the LCD to use your library on tne 8080-8 interface mode?

i mean the placing the resistors.

thank you so much.

You connect 3.3V, GND and your LCD pins to the Due headers:

#define LCD_RST A4  //RESX on datasheet
#define LCD_CS A3   //CSX
#define LCD_RS A2   //DCX
#define LCD_WR A1   //WRX_SCL
#define LCD_RD A0   //RDX

#define LCD_D0 8
#define LCD_D1 9
#define LCD_D2 2
#define LCD_D3 3
#define LCD_D4 4
#define LCD_D5 5
#define LCD_D6 6
#define LCD_D7 7

I can not see LCD_CS or LCD_RS pins from the photos. Only you can see all the pin labels that are printed on the header.

I suggest that you run the LCD_ID_readreg or LCD_ID_readnew sketch from the MCUFRIEND_kbv examples. Edit the readnew sketch to enable the HX8357 registers (remove the slashes):

unlock = unlock_8357;

Then run the graphictest_kbv sketch.

To select the 8080-8 interface, the IM# pins should be IM2=0, IM1=1, IM0=1
The printed instructions on your pcb imply that you should change those links.

Mind you. The readreg sketch will still work with 8080-9. graphictest_kbv will show wrong colours.

I suggest that you post clear photos of the pcb header and your wiring.

avid.

Dear David

thank you again and sorry for the delay, here is the complete image of the pin.
i will give the result as soon as possible.
thanks.

Sorry another question, does utft support hx8357d?

on this page :

https://forum.arduino.cc/index.php?topic=446606.0

you have said that : "UTFT does not support HX8357-D with SPI."

so does it support the 8 Bit or 16 Bit mode?

thanks.

Thanks for the photo. CS and RS are revealed.

I would select 8080-8 interface. move link on the IM1 line from 0 to 1. I would be happier with real solder-link on every IM# line. i.e. make '0' link on IM2, '1' link on IM1, '1' link on IM0.

Connect pins as if it was a Mcufriend shield. Run LCD_ID_readnew sketch (with unlock_8357). Use MCUFRIEND_kbv library.

Alternatively select 8080-16. Run TFT_HX8357 library. HX8357-D is almost the same as HX8357-C.

Or select 4-pin SPI interface. Run Adafruit_HX8357 library.

Always use 3.3V Arduino e.g. Due, Zero, ...

It is not worth the pain of level shifters with a 5V Arduino. Possible with SPI. Too many channels for parallel.

No, UTFT does not support HX8357 in any interface.

David.

Edit. You have quoted Bodmer's Forum message on the AvrFreaks Forum. You have misunderstood. Bodmer is just saying that TFT_HX8357 is only 8080-16. Adafruit_HX8357 is only SPI.

Please can you stick to one Forum and write there. Duplicate posts upset people.