Go Down

Topic: 2.8" TFT LCD, unknown ID. (Read 58396 times) previous topic - next topic

samuraijap

#60
Jan 02, 2015, 04:49 pm Last Edit: Jan 20, 2015, 03:34 pm by samuraijap
can your confirm the resolution of yours is 240*320 as advertised?
The ILI9327 is 240*400, unless the software is customized.
Because this LCD is QVGA, it will be either ILI9320 ILI9325  ILI9328 ILI9341 HX8347 HX8357
(8bit pararell mode)
The process of the initialization is the same.


https://github.com/adafruit/TFTLCD-Library

I rewrite the Sketch File of this library.
And comment out the ID determining part of from 47 lines to 84 lines.
change  tft.begin (identifier);  to tft.begin (0x8357);


Bert46

  Hi, when i use Heer Lorcan Code, i got this errors :

sketch_jan03a:10: error: 'tft' was not declared in this scope
sketch_jan03a:12: error: expected unqualified-id before 'if'

I have the Adafruit lib's and the   STDINT.h

Am i missing something ??

elik745i

Finaly I got it working, but I need programming experts to give me a hand to fix some issues:

1) Text is mirrored
2) to hook it to Arduino MEGA without any hardware mods (adafruit library need to be changed I guess)


Here is the results and wiring:

http://www.voltrans.az/en/2015/01/06/2-8-tft-lcd-%D0%B4%D0%B8%D1%81%D0%BF%D0%BB%D0%B5%D0%B9-%D0%BD%D0%B0-%D1%87%D0%B8%D0%BF%D0%B5-hx8357-%D0%B2-%D1%81%D0%B2%D1%8F%D0%B7%D0%BA%D0%B5-%D1%81-arduino-mega/
Wake up NEO...

disneysw

http://www.amazon.co.uk/Generic-Touch-Screen-Card-Socket/dp/B00K0F2QR0

http://www.ebay.com/itm/2-8-TFT-LCD-Display-Touch-Screen-Module-with-SD-Solt-Arduino-UNO-TOP-M63-/351206859044?pt=LH_DefaultDomain_0&hash=item51c58f6124

These shields are fake and imitation.  :smiley-eek-blue:

This is nothing but LCD and backlight.
Driver IC is not at all to this shield.
I have the same shield and while I havent got it working 100% it does display some graphics if I force my library to ignore the returned device ID and only try to use a ILI9325 controller chip.

That said I am pretty sure the board is actually using an lgdp4535 chip since the returned ID is 0x4535.

Unfortunatly I have not found a datasheet on the lgdp4535 yet.

BTW, A lot of people do not seem to understand most of these shields are designed to work with an UNO. As such they will ony work with boards like the Mega if the library supports it (and it is configured correctly) or they need to abandon the shield and wire the interconnects manually.  



NiceAntoine

Hello,
I have a tft lcd with and the returned ID is 0x4535 just the same as you... and I could not get it to work... did you succeed?? any help is apreciated :)

disneysw


Actually yes I have a working lgdp4535 display (device ID 0x4535).


I was unable to find a programming datasheet for the lgdp4535 but I did turn-up some code for a different micropocessor platform that made this possible.


So this is a hack of the "Adafruit_TFTLCD" library where the ILI9341 initialisation valuse are replace with the values for the lgdp4535 and the library is initalised forced to use the ILI9341.


To do this modify "Adafruit_TFTLCD.cpp" and replace the array "ILI932x_regValues" with the following:

static const uint16_t ILI932x_regValues[] PROGMEM = {
 
      0x15, 0x0030,     /* Set the internal vcore voltage */                                             
     0x9A, 0x0010,     /* Start internal OSC */
      0x11, 0x0020,        /* set SS and SM bit */
      0x10, 0x3428,        /* set 1 line inversion */
      0x12, 0x0002,        /* set GRAM write direction and BGR=1 */
      0x13, 0x1038,        /* Resize register */
      TFTLCD_DELAY, 40,
      0x12, 0x0012,        /* set the back porch and front porch */
      TFTLCD_DELAY, 40,
      0x10, 0x3420,        /* set non-display area refresh cycle ISC[3:0] */
      0x13, 0x3045,        /* FMARK function */
      TFTLCD_DELAY, 70,
      0x30, 0x0000,      /* RGB interface setting */
      0x31, 0x0402,        /* Frame marker Position */
      0x32, 0x0307,      /* RGB interface polarity */
      0x33, 0x0304,      /* SAP, BT[3:0], AP, DSTB, SLP, STB */
      0x34, 0x0004,      /* DC1[2:0], DC0[2:0], VC[2:0] */
      0x35, 0x0401,      /* VREG1OUT voltage */
      0x36, 0x0707,      /* VDV[4:0] for VCOM amplitude */
      0x37, 0x0305,      /* SAP, BT[3:0], AP, DSTB, SLP, STB */
      0x38, 0x0610,      /* DC1[2:0], DC0[2:0], VC[2:0] */
      0x39, 0x0610,      /* VREG1OUT voltage */
      0x01, 0x0100,      /* VDV[4:0] for VCOM amplitude */
      0x02, 0x0300,      /* VCM[4:0] for VCOMH */
      0x03, 0x1030,      /* GRAM horizontal Address */
      0x08, 0x0808,      /* GRAM Vertical Address */
      0x0A, 0x0008,     
      0x60, 0x2700,        /* Gate Scan Line */
      0x61, 0x0001,        /* NDL,VLE, REV */
      0x90, 0x013E,
      0x92, 0x0100,
      0x93, 0x0100,
      0xA0, 0x3000,
      0xA3, 0x0010,
      0x07, 0x0001,
      0x07, 0x0021,
      0x07, 0x0023,
      0x07, 0x0033,
      0x07, 0x0133,
};



Then in your setup code use: "tft.begin(0x9341);"



Thats it!

NiceAntoine



Thanks for your answer :).

However it did still not works for me...
To do this modify "Adafruit_TFTLCD.cpp" and replace the array "ILI932x_regValues" with the following:
...
Then in your setup code use: "tft.begin(0x9341);

I replaced ILI9341 values and I am still getting a white screen....Later I tried to use ILI932x values and only got a white screen...



Could you send me your hacked TFTLCD library please so I can be sure if my screen is defective or not?

Anyway thanks a lot for your answer :)






NiceAntoine

It finally worked!!! Thank you very much Dysneysw, if you wish I can put " hacked by Disneysw" at the beginig of the code :)

disneysw


Glad I could be of help and you got it working.


I don't need any credit for this, there actually was not much to it, the only issue was lack of information on  lgdp4535.The people who wrote the original library for Adafruit did all the heavy lifting.


I was going to port the initialisation code into the UTFT library but have been unsuccessful in getting it to work for reasons I don't understand at the moment. Given I can do what I need to with the current  library I may just stick with it :-)





darkbit

Hi

In my case, for 2.8 mcufriend board, I had to use 0x9325 as an identifier instead of 0x9341. What can be important, I do not have an original UNO board. I have "Version Board ATmega328P UNO R3 CH340T Instead 16U2" http://www.ebay.com/itm/Version-Board-ATmega328P-UNO-R3-CH340T-Instead-16U2-Free-USB-Cable-for-Arduino-D-/261562132907

Anyway, thank you very much for above solution with PROGMEM ;)
I thought that I will have to throw away this TFT.

my_legend_mm

Hi every one .
I bought 2.8 TFT LCD Shield and i don't know how determined the type of Controller  :(  .
I ask the seller about the the type of it controller he give me ILI9341 .
I'm try use many more Library without any result  :(  .
there is one library Loaded in Arduino , library from Adafruit-GFX  , serial monitor find LCD Identifier is 139 ! !
Does this mean it's working but it's not realizes the type of controller ??
There is something caught my attention the shield does't have any ICs like all shield i see during my search !!
i attach photo to the LCD shield >
Can any one help me  :)  ?
thanks

my_legend_mm

The Shield in side .

mausi_mick

It's functions good with the changes from disneysw,
but only with

  tft.begin(0x9325);

thanks !

marc-duyn

I saw above also the mirror issue, with this driver ili9341
but i can not find the solution
i did change the data  in the ccp file but that did not help

can someone point me to the solution or give me a solution

Thanks.


Marc

Stan_S

Actually yes I have a working lgdp4535 display (device ID 0x4535).


I was unable to find a programming datasheet for the lgdp4535 but I did turn-up some code for a different micropocessor platform that made this possible.


So this is a hack of the "Adafruit_TFTLCD" library where the ILI9341 initialisation valuse are replace with the values for the lgdp4535 and the library is initalised forced to use the ILI9341.


To do this modify "Adafruit_TFTLCD.cpp" and replace the array "ILI932x_regValues" with the following:

static const uint16_t ILI932x_regValues[] PROGMEM = {
 
      0x15, 0x0030,     /* Set the internal vcore voltage */                                             
     0x9A, 0x0010,     /* Start internal OSC */
      0x11, 0x0020,        /* set SS and SM bit */
      0x10, 0x3428,        /* set 1 line inversion */
      0x12, 0x0002,        /* set GRAM write direction and BGR=1 */
      0x13, 0x1038,        /* Resize register */
      TFTLCD_DELAY, 40,
      0x12, 0x0012,        /* set the back porch and front porch */
      TFTLCD_DELAY, 40,
      0x10, 0x3420,        /* set non-display area refresh cycle ISC[3:0] */
      0x13, 0x3045,        /* FMARK function */
      TFTLCD_DELAY, 70,
      0x30, 0x0000,      /* RGB interface setting */
      0x31, 0x0402,        /* Frame marker Position */
      0x32, 0x0307,      /* RGB interface polarity */
      0x33, 0x0304,      /* SAP, BT[3:0], AP, DSTB, SLP, STB */
      0x34, 0x0004,      /* DC1[2:0], DC0[2:0], VC[2:0] */
      0x35, 0x0401,      /* VREG1OUT voltage */
      0x36, 0x0707,      /* VDV[4:0] for VCOM amplitude */
      0x37, 0x0305,      /* SAP, BT[3:0], AP, DSTB, SLP, STB */
      0x38, 0x0610,      /* DC1[2:0], DC0[2:0], VC[2:0] */
      0x39, 0x0610,      /* VREG1OUT voltage */
      0x01, 0x0100,      /* VDV[4:0] for VCOM amplitude */
      0x02, 0x0300,      /* VCM[4:0] for VCOMH */
      0x03, 0x1030,      /* GRAM horizontal Address */
      0x08, 0x0808,      /* GRAM Vertical Address */
      0x0A, 0x0008,     
      0x60, 0x2700,        /* Gate Scan Line */
      0x61, 0x0001,        /* NDL,VLE, REV */
      0x90, 0x013E,
      0x92, 0x0100,
      0x93, 0x0100,
      0xA0, 0x3000,
      0xA3, 0x0010,
      0x07, 0x0001,
      0x07, 0x0021,
      0x07, 0x0023,
      0x07, 0x0033,
      0x07, 0x0133,
};



Then in your setup code use: "tft.begin(0x9341);"



Thats it!
I tried to change the file with no success, any chance you could post the modified fil? anh help is greatly apriciated.

Go Up