TFT LSD 3.2 " 16bit chip ili9341.

There is a problem. Need a library ili 9341 16bit. Found only ISP and 8bit.

This might help, I think it includes the 16 bit library which you need: http://www.ramtex.dk/display-controller-driver/rgb/ili9341.htm

diger67, what is the problem?

Arduino UTFT library supports 16 bit for the ili9341.
Arduino Ucglib supports 18 bit for the ili9341.

Oliver

Thanks for the answers, but UTFT supports only ISP.

Can you tell me what UTFT model to use for 16 bit mode with ILI9341?

The class constructor takes the same argument types, independant of the model.

Thanks!

Wim

As far as I can see, the current UTFT.zip does not support 16-bit parallel for an ILI9341.

Since it already has descriptions for ILI9341 in SPI mode, you just need to add an ILI9341_16 macro to "UTFT.h" and an extra entry to dsx[], dsy[], dtm[] in "UTFT.cpp"

I doubt if anyone would ever use ILI9341_S4P. So instead of adding an extra entry, you could rename and replace the ILI9341_S4P by ILI9341_16. e.g. change dtm[26] to 16

Perhaps Mr Karlsen will add it as part of the next release.

David.

david_prentice: As far as I can see, the current UTFT.zip does not support 16-bit parallel for an ILI9341.

Since it already has descriptions for ILI9341 in SPI mode, you just need to add an ILI9341_16 macro to "UTFT.h" and an extra entry to dsx[], dsy[], dtm[] in "UTFT.cpp"

I doubt if anyone would ever use ILI9341_S4P. So instead of adding an extra entry, you could rename and replace the ILI9341_S4P by ILI9341_16. e.g. change dtm[26] to 16

Perhaps Mr Karlsen will add it as part of the next release.

David.

I don't where you're looking but my copy of UTFT, version 2.79, supports ONLY 16 parallel for the 9341. Further, you've only described how to add a name to UTFT, your description certainly does not add the necessary code to add a new display type.

"ILI9341" and "CTE32HR" are acceptable types to use in the constructor.

My apologies. I am actually using UTFT v2.74 with some additions of my own. I downloaded the current UTFT v2.81 to compare.

Both v2.74 and v2.81 have in "UTFT.h":

#define ILI9481 21
...
#define ILI9341_S5P 25
#define ILI9341_S4P 26
...
#define CTE32HR 21 // ILI9481 (16bit)
...
#define TFT01_22SP 25 // ILI9341 (Serial 5Pin)
#define MI0283QT9 26  // ILI9341 (Serial 4Pin)
...

v2.81 has an additional:

#define TFT01_24SP 25 // ILI9341 (Serial 5Pin)
#define TFT22SHLD 25 // ILI9341 (Serial 5Pin)
#define DMTFT28105      25  // ILI9341  (Serial 5Pin)

I do not see an ILI9341 with 16-bit interface, but it is fairly simple to add suitable support for ILI9341_16 and add some human readable module names as aliases. From my own notes added to "UTFT.cpp" the procedure is:

// .kbv #define a new CONTROLLER macro in "UTFT.h" and DISABLE_CONTROLLER macro in "memorysaver.h"
// .kbv create suitable "CONTROLLER/initlcd.h" and "CONTROLLER/setxy.h"
// .kbv append dsx[], dsy[], dtm[] entries for CONTROLLER# in "UTFT.cpp"
// .kbv append #ifndef DISABLE_CONTROLLER conditionals in initlcd and setxy switch() blocks
// .kbv add CONTROLLER macro as a keyword to "keywords.txt"

Personally, I dislike the idea of hardcode numbers for the module-alias macros. For maintenance purposes, it would seem safer to use the symbol e.g.:

#define TFT01_22SP   ILI9341_S5P                // ILI9341 (Serial 5Pin)

David.

Can you tell me what should be in the initlcd.h and setxy.h files?

Or is it necessary to go through the ILI9341 datasheet?

Thanks!

Wim

As I wrote earlier, UTFT has already got the initialisation sequences in ILI9341_S5P directory. The sequences for parallel should be almost exactly the same. Just copy them.

I do not have a parallel ILI9341. I have run an ILI9320 in SPI mode and in 8-bit parallel. The setup is much the same but the command/data is set with an escape code rather than a RS pin.

David.

Thank you for this thread as it was of great help in getting my LCD with ILI9341 working with 16bit. Just a follow up for others that may have the same problem:

Can confirm that the procedure that David posted for modifying UTFT works using the ILI9327/initlcd.h and ILI9327/setxy.h files. That is, when creating the new controller (eg. ILI9341_16), copy the ILI9327 setxy.h and initlcd.h files for the driver.

If you are in a hurry/lazy you could also simply change the dsy[] entry for ILI9327 in "UTFT.cpp" to match the 240x320 display of the ILI9341 (the ILI9327 is 240x400 16 bit) and then use the ILI9327 controller in UTFT.

Hi, KMacK thanks for solve problem, but tell me why after correct from 240x400 to 240x320 screen on lcd is move to left - I don't see all :( I have LCD with ILI 9341 . I don't understand contents of setxy.h and initlcd.h :(

in UTFT.cpp I change 399 to 319

First of all, please post a link to your actual device. Compare the item in your hand with the photos on your link. If necessary, describe the differences in words. Or find a more accurate picture.

Note that most displays are 3.3V. Many Ebay vendors will lie about anything for a sale or are just ignorant. If you have a photo or schematic, there are some obvious clues about whether your display is 5V compatible.

Then determine which controller is actually mounted on your display.

Once we know which controller and what wiring is used, it is easy to add another device or hardware interface to UTFT.

David.

You right, in my code was mistake, on the example UTFT by Henning work fine on DUE

I buy 5pcs TFT_320QVT on aliexpress but I got of course TFT_320QVT_9341. Just necessary update 399 for 319 in UTFT.cpp section dsy and use ILI9327 controller

Only coordinate change, is other like SSD1289

Thank David

Regards

Well, I went to Aliexpress and Searched for "TFT_320QVT" with no success.

If you want help, please provide a proper link or at least some text that might be Searched for.

Seriously, if you have a 9341, there is a suitable initlcd.h entry. Just duplicate this for your 16-bit parallel. Of course it is easier to kludge an existing entry.

UTFT has no concept of reading the controller ID. So you cannot ask it outright. However, there are subtle differences between the 9327, 9341, 9481, 9486, 9488, ... writable registers.

With a few simple tests, you can see which controller you actually have. And then your screen will work perfectly.

Oh, if you have a 9341, you should copy the 9341 S5P "initlcd.h". You certainly should NOT copy the ILI9327 entry.

David.


Aliexpres: http://www.aliexpress.com/item/5pcs-lot-3-2-TFT-LCD-Module-Display-Touch-Screen-Panel-PCB-Adapter-Blue-SSD1289-with/1966014935.html

Hi,

http://www.barth.pl/pictures/TFT_320QVT_9341_bottom.jpg http://www.barth.pl/pictures/TFT_320QVT_9341_top.jpg http://www.barth.pl/pictures/TFT_320QVT_9341_DUE.jpg

Order: http://www.aliexpress.com/item/5pcs-lot-3-2-TFT-LCD-Module-Display-Touch-Screen-Panel-PCB-Adapter-Blue-SSD1289-with/1966014935.html

Regards Barth

Well, that is certainly a pretty big clue. i.e. you have got a ILI9341 and not a SSD1289. I have no idea why you thought of using ILI9327. It has a different part number.

So you need to add the 9341 initlcd.c from ILI9341/S5P to a new ILI9341_16 entry. I described the procedure in an earlier message in this thread.

Or you could overwrite an existing entry. Just remember that any new release of UTFT might need hacking too. However, since ILI9341 is a very popular controller, it is pretty likely that Henning will include the 16-bit parallel version in the next release.

Incidentally, the screen is a 3.3V part. You need to use the appropriate adapter shield to provide level conversion for a Mega.

David.

Edit. You posted your "DUE" photo while I was replying. The red pcb does not look much like a DUE to me. Of course A DUE does not need level shifting.

David it is my board on SAM3X8E - it have nothig with Due of course...I put on my board WIFI and other things like ampli and Power OUT. Yes Due no need level inverter from 5 to 3v3

http://www.barth.pl/pictures/barth_mb_SAM.jpg

Helloo,

I bought a display on aliexpress this one.

http://www.aliexpress.com/item/Free-Shipping-3-2-inch-high-definition-TFT-LCD-color-touch-screen-module-240X320-ILI9341/32394723457.html

for three days trying to run it but without success. I am downlaod UTFT version 2.81.

I saw that there was no discussion about that, but I could not understand how to adjust to make it work. Would anyone could help me how to start ili9341 on the Arduino mega2560.

Does anyone have a code example?