3.2" TFT_320QDT_9341 not responding using UTFT lib

Hello, I am trying to get a 3.2" TFT working with an Elegoo Mega 2560R3 - this board shield and display. https://www.ebay.ie/itm/3-2-TFT-Pantalla-tactil-LCD-Display-TFT-LCD-Mega-Shield-Para-Arduino-Mega2560/263394322802?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

Given what is written on the TFT i assume the controller is a 9341, so have loaded up an example from RinkyDink's UTFT library and set the constructor as follows

UTFT myGLCD(ILI9341_16,3,4,7,5,6);

All i get though is a flickering backlight. I have confirmed that the Arduino is working fine and have asked for more details about the TFT from the retailer - though i'm not hopeful.

I would expect this to just work, given that i bought the shield and the TFT together. Any suggestions on how to debug?

ssmith73: Hello, I am trying to get a 3.2" TFT working with an Elegoo Mega 2560R3 - this board shield and display.

Given what is written on the TFT i assume the controller is a 9341, so have loaded up an example from RinkyDink's UTFT library and set the constructor as follows

UTFT myGLCD(ILI9341_16,3,4,7,5,6);

All i get though is a flickering backlight. I have confirmed that the Arduino is working fine and have asked for more details about the TFT from the retailer - though i'm not hopeful.

I would expect this to just work, given that i bought the shield and the TFT together. Any suggestions on how to debug?

Sorry i do not read spanish very well. Is the Display and Arduino Mega2560 Clone that you purchased similar to this one listed on the ebay uk site? Display and Adruino Mega2560 Clone

Does the display and clone have a level shifter board with them?

Where did you get the Pin numbers from to use with the Library?

The Display is 3.3v operating while the Adruino Mega2560 Clone is operating voltage of 5v. So there is a need for a level shifter board.

The next question I ask in the event I may need to replicate your project. Arduino Board is an Arduino Mega2560 Clone What version of Arduino IDE are you using? What operating System are you using? Linux, MacOSX, MS Windows, other

I am not familar with RinkyDinks Library. I need to look at that.

Was there any documentation with the Display? Was there any suggestions as to which Arduino Library to use with this Display?

I seem to remember a similar question about TFT_320_QVT and TFT_320_QDT 40-pin displays. I think it was that QVT use the 8080-16 parallel interface and QDT uses the 8080-8 interface

UTFT does not support the ILI9341_8 model.

I can't find my reply but this might help you.

Perhaps someone can find the specific thread.

David.

Here is a link to my setup.

Or here: as a link if the image tag doesn't work. https://photos.app.goo.gl/oQGGTbo8ufifYEL13

Here is RinkyDink's page http://rinkydinkelectronics.com/library.php?id=51

  • There is a level shifter board - the TFT LCD Mega shield V2.2
  • The pin numbers i got from different places, all seem to agree with those i used. (could these be wrong)?
  • Using IDE 1.85
  • Windows 10 Enterprise Build

There was no documentation with the board, i am chasing this down with the supplier, but he sent me this video https://www.youtube.com/watch?v=gubJBTmBNP8 - which is hilarious, because the display doesn't work in this video either!

Is there someway to work out if i have the 8-bit, or 16-bit model - or for that matter, if the text written on the display is actually correct (can a status register be read perhaps?)

No, you can NOT read the ID with that Adapter shield.

I would just try USE_SPECIAL with USE_MEGA_8BIT_SHIELD or USE_MEGA_16BIT_SHIELD and tft.begin(0x9341)

If you have a 3.3V Due you could wire direct to the display. And run the LCD_ID_readreg sketch. But I would stick with editing the USE_xxxx macros

David.

This is killing me now - even this link - which is the exact same display and level-shift board as the page, or at least it seems to be - doesn't work.

In case this helps someone else though

http://codedemonelectronics.com.au/thinktank/arduino/tft-320-qvt-9341

Did you try USE_SPECIAL ?

MCUFRIEND_kbv supports over thirty 240x320 controllers but since your pcb says 9341 it is 99% certain that you have an ILI9341. You have only got a choice of 8080-16 or 8080-8 interface.

Make notes on paper when you try something. Then you can type up each numbered step with the result.

This will take you an extra 20 minutes or so. But you will probably get an accurate reply in one go.

Incidentally, your link is about the QVT version which definitely works with model: ILI9341_16 from UTFT v2.8.2. And the author is not very sure of what he is doing. The ILI9327 is 240x400 with completely different Manufacturer Registers.

David.

Thanks David: I did not try the macros yet, it wasn't clear to me how to do it. Just so i can try out what you are suggesting here. You recommend adding

USE_SPECIAL with USE_MEGA_8BIT_SHIELD or USE_MEGA_16BIT_SHIELD and tft.begin(0x9341)

Where do these macros go? In the sketch i assume, in this example what is tft (the result of the constructor i guess, but how do i configure the constructor?

On to something perhaps: Running the diagnose_TFT_support sketch from the MCUFRIEND_kbv

Diagnose whether this controller is supported
There are FAQs in extras/mcufriend_how_to.txt

tft.readID() finds: ID = 0x404

Probably a write-only Mega2560 Shield
#define USE_SPECIAL in mcufriend_shield.h
#define appropriate SPECIAL in mcufriend_special.h
e.g. USE_MEGA_16BIT_SHIELD
e.g. USE_MEGA_8BIT_SHIELD
Hint. A Mega2560 Shield has a 18x2 male header
Often a row of resistor-packs near the 18x2
RP1-RP7 implies 16-bit but it might be 8-bit
RP1-RP4 or RP1-RP5 can only be 8-bit

it’s a start. The header on my shield is 20x2, there is no row of resistor packs - just 5 IC’s what i am guessing are level translators - 5V to 3.3V - i’ll look at the header file now and make the changes

I gave you a link in #2.

Your 40-pin display is 3.3V and readable with a 3.3V Arduino.

The Adapter Shield is write-only. So you can never read the ID. You can only guess.

I suspect that it is ILI9341 with either 8080-16 parallel interface or 8080-8 parallel interface.

  1. Plug the display into the Adapter and into the Mega2560.
  2. edit mcufriend_shield.h: #define USE_SPECIAL
  3. edit mcufriend_special.h: #define USE_MEGA_16BIT_SHIELD
  4. or #define USE_MEGA_8BIT_SHIELD

  5. edit graphictest_kbv.ino: tft.begin(0x9341);

  6. run graphictest_kbv.ino

Report back with the results.

Yes, I know that this is all rather complicated. But the library is designed for Mcufriend Uno Shields.

Install the MCUFRIEND_kbv library with the Library Manager. The Library "edits" are nothing more difficult than removing or adding slash characters. e.g. //

The sketch edit involves using ctrl-F to search for tft.begin(

Yes, it is a little complicated. Please understand that the library is designed for Uno Shields that just "plug and go".

The diagnose_TFT_support sketch can only tell you that it is write-only. But you knew that already. The 2560 Shields either have resistor packs or 74HC245 buffers. Other chips are available.

David.

Sorry David - should have followed your advice earlier. i can't get any of the above to work, i've edited mcufriend_special.h -

added #define USE_SPECIAL enabled #define USE_MEGA_XX (tried both 8/16bit version)

edited graphictest_kbv.ino -

tft.begin(0x9341);

Somewhat discouragingly, the display no longer even flickers - it is just backlit, running the graphictest_kvb.ino sketch does nothing, the serial dumps

Serial took 0ms to start ID = 0x404

Read Registers on MCUFRIEND UNO shield controllers either read as single 16-bit e.g. the ID is at readReg(0) or as a sequence of 8-bit values in special locations (first is dummy)

LCD_ID_readreg dumps the following.

reg(0x0000) 0C 0C ID: ILI9320, ILI9325, ILI9335, ... reg(0x0004) 0C 0C 0C 0C Manufacturer ID reg(0x0009) 0D 0D 0D 0D 0D Status Register reg(0x000A) 0E 0E Get Power Mode reg(0x000C) 0C 0C Get Pixel Format reg(0x0061) 6D 6D RDID1 HX8347-G reg(0x0062) 6E 6E RDID2 HX8347-G reg(0x0063) 6F 6F RDID3 HX8347-G reg(0x0064) 6C 6C RDID1 HX8347-A reg(0x0065) 6D 6D RDID2 HX8347-A reg(0x0066) 6E 6E RDID3 HX8347-A reg(0x0067) 6F 6F RDID Himax HX8347-A reg(0x0070) 7C 7C Panel Himax HX8347-A reg(0x00A1) 2D 2D 2D 2D 2D RD_DDB SSD1963 reg(0x00B0) 3C 3C RGB Interface Signal Control reg(0x00B4) 3C 3C Inversion Control reg(0x00B6) 3E 3E 3E 3E 3E Display Control reg(0x00B7) 3F 3F Entry Mode Set reg(0x00BF) 3F 3F 3F 3F 3F 3F ILI9481, HX8357-B reg(0x00C0) 4C 4C 4C 4C 4C 4C 4C 4C 4C Panel Control reg(0x00C8) 4C 4C 4C 4C 4C 4C 4C 4C 4C 4C 4C 4C 4C GAMMA reg(0x00CC) 4C 4C Panel Control reg(0x00D0) 5C 5C 5C Power Control reg(0x00D2) 5E 5E 5E 5E 5E NVM Read reg(0x00D3) 5F 5F 5F 5F ILI9341, ILI9488 reg(0x00D4) 5C 5C 5C 5C Novatek ID reg(0x00DA) 5E 5E RDID1 reg(0x00DB) 5F 5F RDID2 reg(0x00DC) 5C 5C RDID3 reg(0x00E0) 6C 6C 6C 6C 6C 6C 64 64 64 64 64 64 64 64 64 64 GAMMA-P reg(0x00E1) 6D 6D 6D 6D 6D 6D 6D 65 65 65 65 65 65 65 65 65 GAMMA-N reg(0x00EF) 6F 6F 6F 6F 6F 6F ILI9327 reg(0x00F2) 7E 7E 7E 7E 7E 7E 7E 76 76 76 76 76 Adjust Control 2 reg(0x00F6) 7E 7E 7E 7E Interface Control

Anything else i might try?

ReadReg can never work on a write-only shield.

If the USE_SPECIAL edits were done correctly the ID will say 0xD3D3

USE_SPECIAL is enabled in the mcufriend_shield.h file

Enable verbose build in File->Preferences. When you do a fresh build it should report warning USE_MEGA_8BIT_SHIELD for vagos21 in orange text

or

warning USE_MEGA_16BIT_SHIELD in orange text

David.

OK, i get the orange-text with the warning, and i get 0xD3D3 over the serial port - but i still have only a white (though now flickering again at least) screen - what’s next? I tried both 16b and 8-bit options in the USE_MEGA_XX

AS far as I know the QDT display has the same pinout as the QVT display (or most 3.3V 40-pin displays)

Likewise, the 40-pin Adapter shields all map the 40-pins through level-shifters to the same Mega2560 pins.

Apart from 8080-8 or 8080-16 interface, the wiring is the same. The only difference is that 8080-8 ignores the unused bus pins.

The Red Mcufriend shields come with ANY controller. You can't even believe the numbers printed on the pcb. But I would be 99% certain that your Blue TFT320QDT_9341 actually has an ILI9341.

If both ILI9341-8 and ILI9341-16 have failed, I would enable all the SUPPORT_xxx macros in MCUFRIEND_kbv.cpp and assume 16BIT.

Step through all the 240x320 controller IDs in the how_to file. e.g. try tft.begin(ID) with 0x9325, 0x4747, ...

I presume that you have emailed the Vendor. Someone must have got the QDT display working.

David.

I’ll try tomorrow. Late here. Vendor is offering refund at this stage, but that’s just hassle. Thanks for the help.

ssmith73: Hello, I am trying to get a 3.2" TFT working with an Elegoo Mega 2560R3 - this board shield and display. https://www.ebay.ie/itm/3-2-TFT-Pantalla-tactil-LCD-Display-TFT-LCD-Mega-Shield-Para-Arduino-Mega2560/263394322802?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

Given what is written on the TFT i assume the controller is a 9341, so have loaded up an example from RinkyDink's UTFT library and set the constructor as follows

UTFT myGLCD(ILI9341_16,3,4,7,5,6);

All i get though is a flickering backlight. I have confirmed that the Arduino is working fine and have asked for more details about the TFT from the retailer - though i'm not hopeful.

I would expect this to just work, given that i bought the shield and the TFT together. Any suggestions on how to debug?

I do not know if you have seen the below web pages, but it does appear that they have gotten it to work with a mega.

TFT 320 QVT 9341 – Part I

The thread title refers to the QDT model.

Oranges might not taste so good in an apple pie recipe.

Yes, there are several QDT owners in this forum. I am sure that one of them has had success.

David.

@david_prentice, @ssmith73,

There was a time I started playing with TFTs for Arduino MEGA and shields for Arduino MEGA. I have neither the 320QDT nor the 320QVT model, unfortunately.

But I got advice from David concerning conversion shields, especially for the CTE shields for MEGA and DUE.

I had patched some other shield for DUE with a connection to be able to read. I ordered the CTE shields and some more, but did not try these, as I turned to different TFTs.

When I look at the CTE MEGA shield, I see a big level converter chip. I did not check, but it might be bidirectional, and allow read. And I searched AliExpress for "Arduino MEGA tft shield" and found one that seems to have just series resistors, and might also allow read.

Update: the big converter chip marked ALVC164245 has bidirectional capability, but not automatic, controlled by a direction input. Used unidirectional on the CTE board.

TFT/SD Shield for Arduino MEGA 2560 LCD Module SD Card 2.8 3.2 inch Touch TFT LCD Mega Shield Adjustable Mega 2560 Expansion Board for Arduino

Purchase of one of these just to find out by readReg the controller of the TFT instead of discarding the TFT may be an option.

Jean-Marc

Both Adapters are write-only. You can probably do a hardware mod on the series-resistor style Shield. The i.c. buffer-style shield can not be modded.

There are many QVT owners. model=ILI9341_16 from UTFT_v2.8.2 should work fine. There are a few QDT owners. Perhaps one of them can offer advice. Be patient for a few days. Someone might show up.

Yes. I would read the ID using a 3.3V Arduino. That is not an option for a Mega2560 owner.

David.

david_prentice: The thread title refers to the QDT model.

Oranges might not taste so good in an apple pie recipe.

Yes, there are several QDT owners in this forum. I am sure that one of them has had success.

David.

I have searched using several different search engines and there is nearly no mention of the QDT.

What is the difference between the QDT and the QVT boards?

a more basic question is who makes these boards?