Arduino Forum

Using Arduino => Displays => Topic started by: xnaron on Feb 26, 2014, 10:37 pm

Title: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: xnaron on Feb 26, 2014, 10:37 pm
I picked this up http://www.ebay.com/itm/301104737944 .  It didn't come with any software or links to any drivers.

They call it a 2.8" but it is marked as a 2.6" on the shield.  The specs are:

2.8  inch tft lcd display   (with  touch panel)  
2 controller  :spfd5408  ili9325  hx8347 (listed as S6D0139 in other similar auction)
 320 x 240  resolution

Reading register 0 with tftlcd as in
 uint16_t identifier = tft.readRegister(0x0);
 
reports 139Hex... maybe this means it is sds0139?  This is a samsung driver and I unfortunately can't find a driver for it for arduino.  It is listed in the auction as having the driver available and why bother putting it on an arduino shield if it isn't.

I have tried every library I can find out there I could find.  My last attempts to get it functioning were with UTFT.  I tried all the controllers listed above and numerous others.  I'm hoping that someone else may have this same board and can pointing me to a working library and example.  I only get a white screen and it never changes with any of the examples and libraries I have tried.  the other alternative is that the unit is DOA.
Title: Re: 2.6" LCD from ebay for Arduino UNO
Post by: raschemmel on Feb 27, 2014, 01:16 am
Did you see this ?
Quote
Provide the following information:
1 lcd controller datasheet
2 test code
3 sch (pdf)

References?
Arduino Library and Datasheet


on this page :
http://www.ebay.com/itm/301104737944  (http://www.ebay.com/itm/301104737944)

I assume you didn't receive any of this ?
Title: Re: 2.6" LCD from ebay for Arduino UNO
Post by: olikraus on Feb 27, 2014, 06:45 am
It should work with UTFT and the ili9325 driver. Did you supply correct pin numbers to UTFT?

Oliver
Title: Re: 2.6" LCD from ebay for Arduino UNO
Post by: xnaron on Feb 27, 2014, 04:38 pm

Did you see this ?
Quote
Provide the following information:
1 lcd controller datasheet
2 test code
3 sch (pdf)

References?
Arduino Library and Datasheet


on this page :
http://www.ebay.com/itm/301104737944  (http://www.ebay.com/itm/301104737944)

I assume you didn't receive any of this ?


Yes I did.  I have already requested it from him but he is having a hard time emailing it from China.
Title: Re: 2.6" LCD from ebay for Arduino UNO
Post by: xnaron on Feb 27, 2014, 04:45 pm

It should work with UTFT and the ili9325 driver. Did you supply correct pin numbers to UTFT?

Oliver



Yes I did try that one and I have double checked the pins are mapped to what looks like the correct mapping according to the information I have.

(http://i58.tinypic.com/2vmsdwy.jpg)

I am calling it like this
UTFT myGLCD(ILI9325C,A2,A1,A3,A4);   // Remember to change the model parameter to suit your display module!



Title: Re: 2.6" LCD from ebay for Arduino UNO
Post by: xnaron on Feb 27, 2014, 05:16 pm
The vendor sent me some code and it doesn't work either.  The screen stays white.  I think mine is DOA.
Title: Re: 2.6" LCD from ebay for Arduino UNO
Post by: raschemmel on Feb 27, 2014, 06:30 pm
I wouldn't assume that so quickly.  I have not seen any posts yet about new equipment coming from china doa. It is almost always
a software or pin assignment issue but with shields you can rule out the pin assignment issue.
Title: Re: 2.6" LCD from ebay for Arduino UNO
Post by: xnaron on Feb 27, 2014, 08:42 pm
I got it working (sort of) but I had to use arduino 0023.  The quality of this display is bad.  I am not sure if it is caused by a configuration issue or not.    The screen looks really washed out like the brightness is too high.  The text bleeds across the screen as well.

Here is a vid http://www.youtube.com/watch?v=DnGvTZgt_T4
Title: Re: 2.6" LCD from ebay for Arduino UNO
Post by: olikraus on Feb 27, 2014, 09:15 pm
Which lib did you use? Meanwhile i think UTFT will not work, because UTFT expects data pins at arduino pins 0 to 7, where your shield has these pins from 2 to 9.

Oliver
Title: Re: 2.6" LCD from ebay for Arduino UNO
Post by: xnaron on Feb 27, 2014, 09:55 pm

Which lib did you use? Meanwhile i think UTFT will not work, because UTFT expects data pins at arduino pins 0 to 7, where your shield has these pins from 2 to 9.

Oliver


I used "TFTLCD" provided by the seller.  It appears to be a derivation of the adafruit driver.  If you take a look at this video at the start you can see when I press the reset button on the UNO that the color looks perfect for a split second.   I need to figure what is happening there and try and get it too look like that all the time.  

Here is the datasheet for the lcd driver  http://www.rockbox.org/wiki/pub/Main/CreativeZENXFi/DS-S6D0139_V0-5_Preliminary.pdf  There is a function called MIE that supposedly dynamically adjusts the backlight based on the screen content.  It is set with register 0x73.  I tried various combinations to that register and it doesn't seem to make a difference.  I need to figure out what happens when I hit the reset button.... because the image looks perfect for a split second when i do that.

http://www.youtube.com/watch?v=ZCWe70Rfs08&list=UU7gRllKyFauOJ5vDk8y2bSg
Title: Re: 2.6" LCD from ebay for Arduino UNO
Post by: xnaron on Feb 27, 2014, 10:40 pm
I'm pretty sure the problem will be with the init function of the driver setting a register value to something non-ideal.  Below are the init settings from tftlcd.cpp.  I will go through them with the lcd driver document and try and make some sense of it.


Code: [Select]

static const uint16_t _regValues[] PROGMEM = {
  0x0000, 0x0001,
   0x0007, 0x0000,  
   0x0013, 0x0000,  
   0x0011, 0x2604,    
   0x0014, 0x0015,  
   0x0010, 0x3C00,  
   0x0013, 0x0040,
   0x0013, 0x0060,    
   0x0013, 0x0070,
     
   0x0001, 0x0127,      
   0x0002, 0x0700,  
   0x0003, 0x1030,    
   0x0007, 0x0000,    
   0x0008, 0x0404,    
   0x000B, 0x0200,
   0x000C, 0x0000,  
   0x00015,0x0000,    
     
   //gamma setting    
   0x0030, 0x0000,      
   0x0031, 0x0606,    
   0x0032, 0x0006,    
   0x0033, 0x0403,  
   0x0034, 0x0107,  
   0x0035, 0x0101,
   0x0036, 0x0707,  
   0x0037, 0x0304,  
   0x0038, 0x0A00,    
   0x0039, 0x0706,    
     
   0x0040, 0x0000,    
   0x0041, 0x0000,      
  0x0042, 0x013F,    
  0x0043, 0x0000,  
  0x0044, 0x0000,    
  0x0045, 0x0000,    
  0x0046, 0xEF00,    
  0x0047, 0x013F,    
  0x0048, 0x0000,    
  0x0007, 0x0011,  
  0x0007, 0x0017,    

};

void TFTLCD::initDisplay(void) {
Title: Re: s6d0139 driver need init tips - 2.6" LCD from ebay for Arduino UNO
Post by: xnaron on Feb 28, 2014, 07:42 pm
ugh...this lcd config is over my head...  I have tried different gamma configs and nothing seems to help

This is what the image looks like while the sketch is running
(http://i61.tinypic.com/kb61bk.jpg)


This is what the image looks like for a split second after I press the reset button on the UNO
(http://i59.tinypic.com/258w5tj.jpg)

So something happens during a reset which makes the image look like it should.  Has anyone seen this before?  Driver chip is s6d09139  http://www.rockbox.org/wiki/pub/Main/CreativeZENXFi/DS-S6D0139_V0-5_Preliminary.pdf  If someone can help me make sense of this I'd really appreciate it.

thanks
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: wisconsinjr on Mar 05, 2014, 12:54 am
I screwed up and ordered one of those too. Can you share the library as I can't seem to get them to send it to me. I attached a picture of the LCD part number that mine had.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: agarza on Mar 23, 2014, 06:40 am
Any idea where I can get the modified library?
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: agarza on Mar 27, 2014, 05:14 am
I finally got it working (sort of).
Got the display working and the touchscreen.
I haven't been able to make the SD work.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: luxboy on Apr 24, 2014, 10:40 am
hi,

I've bought the same screen and i have the same problem. Screen too white. If i connect the RD to 3.3v i have a little  better image but not 100% good.

Anyone have solved the problem? I think is a wiring problem or the MIE of this screen.

AGARZA, did you have yours working fine?

thanks
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: acharis on Apr 27, 2014, 11:35 am
I bought the same shield. Original delivered library was written for alpha version arduino. I made some changes in it and in touchscreen library now it is working good. But I have still problem with backlight (brigtness). I will be very happy, if someone come with solution. (Maybe on HW base, I will try it next, if I will have the time)
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: luxboy on Apr 27, 2014, 02:54 pm
hi,

did you have the card reader working properly? with the library example provided by the seller bitmap i have always errors.

about the image too clear i have make a change on some wirings and now it works with a great image quality.

thanks
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: Hr_Jensen on Apr 27, 2014, 03:31 pm
Hi.

I also bought the exact same shield, and having some problems getting it up and running.  :~
But following this thread it looks like there is hope after all.
It sounds like you two (Luxboy and acharis) between you have a complete solution for this board.

Luxboy < can you maybe post a schematic of the wiring ?

acharis < can you maybe post the code and libraries you are using ?


Thanks in advance.
Regards Torben.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: luxboy on Apr 27, 2014, 05:23 pm
LCD00 ->08
LCD01 ->09
LCD02 ->02
LCD03 ->03
LCD04 ->04
LCD05 ->05
LCD06 ->06
LCD07 ->07

GND->GND
5V->5V
3v3->A0

RD->3v3
WR->A1
RS->A2
CS->A3
RST->A4

that works great for me!

can anyone have the right process/code to make SD reader work?
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: acharis on Apr 27, 2014, 06:25 pm
Here you are. Libraries could not be final,  I don't test it frequently.
I dont play with SD card, so at this moment it is not working, but at monday the provider promises me new code for current version of arduino, so maybe there will some progress.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: acharis on Apr 27, 2014, 06:47 pm
Luxboy: Great work!!!
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: acharis on Apr 28, 2014, 10:24 pm
If I am right there is bad wiring on the board  :~
I found two errors:
Pin 1 from SD card  (CS or SS or CD) is not connected to any pin to the arduino.
Pin 3 from SD card has to be connected to the GND, but is connected to the pin 10.

Other pins are OK, but if I wire the board as luxboy, then the 3,3V is not connected right.

Tommorow I will try to make changes on the board and test it.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: Hr_Jensen on Apr 29, 2014, 07:37 am
Hi.


After a long waiting time, I now have received this from the ebay seller of the board:

"Please go to :https://www.dropbox.com
User name is :icsales.elena@gmail.com
Password: file123
There is an file named:2.6 inch lcd."

Have not tested the code out yet, but thought i share the file.


Regards Torben.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: acharis on Apr 29, 2014, 06:45 pm

If I am right there is bad wiring on the board  :~
I found two errors:
Pin 1 from SD card  (CS or SS or CD) is not connected to any pin to the arduino.
Pin 3 from SD card has to be connected to the GND, but is connected to the pin 10.

Other pins are OK, but if I wire the board as luxboy, then the 3,3V is not connected right.

Tommorow I will try to make changes on the board and test it.


No success :(
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: acharis on Apr 29, 2014, 06:46 pm

Hi.


After a long waiting time, I now have received this from the ebay seller of the board:

"Please go to :https://www.dropbox.com
User name is :icsales.elena@gmail.com
Password: file123
There is an file named:2.6 inch lcd."

Have not tested the code out yet, but thought i share the file.


Regards Torben.


This is old library and old version of arduino. You can use mine attached before.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: acharis on Apr 29, 2014, 07:36 pm

LCD00 ->08
LCD01 ->09
LCD02 ->02
LCD03 ->03
LCD04 ->04
LCD05 ->05
LCD06 ->06
LCD07 ->07

GND->GND
5V->5V
3v3->A0

RD->3v3
WR->A1
RS->A2
CS->A3
RST->A4

that works great for me!

can anyone have the right process/code to make SD reader work?


I have new finding:
you can connect both RD and 3v3 to A0
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: mustafacey on Apr 30, 2014, 12:19 am
I bought these LCDs and try to control 5 pcs of this module with sample codes and libraries in this topic. Thanks for libraries.
3 pcs are workign perfectly, 1 pcs is working with faded colours and the last one has only white screen.
Namely reason of faded colours is not about gamma variables or library, only because of damaged module.

Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: casemod on Aug 31, 2014, 01:30 am
I am also having issues with this TFT, but mine does NOT report an ID.

Did anyone bought one recently that could share?
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: andreword on Sep 11, 2014, 09:25 pm
I struggled with this display, then finally I found the data sheet and worked through until I got the display working

I have the 2.8 inch display

The data sheet is at http://www.rockbox.org/wiki/pub/Main/CreativeZENXFi/DS-S6D0139_V0-5_Preliminary.pdf

The offending code sequence is in LCDTFT.cpp which results in the whitewashed colours
0x0002, 0x0700

Comment out the line and try your code again

//    0x0002, 0x0700, //  field 0 b/c waveform xor waveform

I've attached a ZIP file of the TFTLCD library from my Arduino software, which has been modified
And a copy of a test file that should be useable with the library

Anyway, I hope this helps

Andrew
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: casemod on Sep 11, 2014, 11:56 pm
Thank you very much for the tips.

Sadly my display does not have the S6D0139 controller. As anything else I tried I just get a blank screen, so i am guessing the manufacturer changed the panel type.

Until someone can figure out what the controller is I advise to stay away from this display. As mentioned this is a first in which the controller ID is not reported, rather comes out as 0.

My display does not have the icons on the lower corner of the touchscreen as advertised on several eBay photos.

It has a reference "028QVT006A" on the back.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: danix13 on Oct 04, 2014, 02:01 am
I tried all the combinations/libraries my screen stays white. I have an identical looking one that works. However the pin notations is the same the mcufriend.com and all other components look the same but the circuit lines are a bit different. I cannot get this LCD to work. The seller included a *.rar archive file that had an entire Arduino Environment with an example. However it was missing the TouchScreen library I've added that and still got nothing. The screens stays white no matter what I do.
***Any*** advice would be highly appreciated!
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: Krydder on Oct 09, 2014, 04:09 pm

I struggled with this display, then finally I found the data sheet and worked through until I got the display working

I have the 2.8 inch display

The data sheet is at http://www.rockbox.org/wiki/pub/Main/CreativeZENXFi/DS-S6D0139_V0-5_Preliminary.pdf

The offending code sequence is in LCDTFT.cpp which results in the whitewashed colours
0x0002, 0x0700

Comment out the line and try your code again

//    0x0002, 0x0700, //  field 0 b/c waveform xor waveform

I've attached a ZIP file of the TFTLCD library from my Arduino software, which has been modified
And a copy of a test file that should be useable with the library

Anyway, I hope this helps

Andrew



Tried the graphicstest. Screen goes dark and nothing happens.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: carmojos on Nov 02, 2014, 02:24 am
I am having the same problem with the same screen. I've tried about every library I can find.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: ruelj2 on Nov 29, 2014, 04:03 am
Finaly got it work after few hours of online research!!

This library is working for the cheap touch screen found on ebay that everyone's trying to get working, written on back : mcufriend.com

Try the graphicstest and tftpaint in the SWTFT/exemples folder

enjoy :D  :D  :D


P.S.:
If the y axis is inverted when your try paint, modify the line 109 for:
p.x = (map(p.x, TS_MINX, TS_MAXX, tft.width(), 0));
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: michel_fdw on Nov 29, 2014, 03:44 pm
hi ruelj2
thank' for the libraries I had a with screen and now with tftpaint  all is ok.
I have only a problem with graphicstest = all is inverted !..... I must see the  display in a mirror.
have you had the same problem?.
thank's again
           
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: ruelj2 on Nov 30, 2014, 01:42 am
I have only a problem with graphicstest = all is inverted !..... I must see the  display in a mirror.
have you had the same problem?.      
Yes Until I got what was wrong.. The SWTFT.cpp was not correcly adapted to realise display inversion...
After few hours trying to make it work I finaly abandoned and I used the TFTLCD components of this article (http://forum.arduino.cc/index.php?topic=221685.30#quickreply) but a little modification.

Note: to assing a point of the touchscreen, you'll have to use the line

" TSPoint p = ts.getPoint(); "
instead of
" Point p = ts.getPoint(); "

so here's the final working Libraries and exemples! I added a tool to convert image for creating bit map!
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: michel_fdw on Nov 30, 2014, 07:00 pm
Great and good job . All ok, thank's again for your work.
I can test now my displays
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: goltermc on Dec 29, 2014, 06:00 pm
I spent quite a while trying several "libraries" out with no success. Just a white screen.
I finally settled in on using the AdaFruit AdaTFTLCD library. I started putting serial print statements within the readID method and the problem went away. The sample code I'm using looks like this


  tft.reset();

  uint16_t identifier = tft.readID();

By putting a delay (serial.print statement) into readID , I was allowing the reset operation to complete! I have not looked at the specs for the chipset which drives the display BUT it is often the case that a hardware reset takes a lot of time. In the end I put a delay(500) inside of the tft.reset method. I now read the device id successfully and have everything working.

You could also put the delay into the arduino setup code like this


  tft.reset();

  delay(500);

  uint16_t identifier = tft.readID();


Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: ARJunior on Dec 30, 2014, 11:51 pm
Hi,

Putting a delay do the job !
Well done ;)

I spent quite a while trying several "libraries" out with no success. Just a white screen.
I finally settled in on using the AdaFruit AdaTFTLCD library. I started putting serial print statements within the readID method and the problem went away. The sample code I'm using looks like this


  tft.reset();

  uint16_t identifier = tft.readID();

By putting a delay (serial.print statement) into readID , I was allowing the reset operation to complete! I have not looked at the specs for the chipset which drives the display BUT it is often the case that a hardware reset takes a lot of time. In the end I put a delay(500) inside of the tft.reset method. I now read the device id successfully and have everything working.

You could also put the delay into the arduino setup code like this


  tft.reset();

  delay(500);

  uint16_t identifier = tft.readID();



Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: GraXXoR on Feb 12, 2015, 03:50 pm
It has taken me nearly two weeks to find this thread after pulling my hair out (look at my profile pic and you'll see just how much hair I have pulled out) and reading up on "mcufriends.com" or whatever was written on the back of my shield.
Anyway, this is my first post on this forum. I don't usually cave in, but I am at a loss at what to do... I downloaded the 1.25mb zip kindly provided by ruelj2 into my libraries folder, but when I try to compile it, I get the following error:

Arduino/Sketchbook/libraries/TFTLCD/glcdfont.c:9:23: error: variable 'font' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 static unsigned char  font[] PROGMEM = {
                       ^


Is this a problem with the new 1.60 IDE?

Thx for any help... You guys rock!
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: dromo on Apr 20, 2015, 10:28 pm
Hello my microcontrolling friends :)
I have a little problem regarding the shield (who not ? :D) The first libary ruelj2 posted is working but a part of the screen is cut away. I dont know if its a technical problem with the shield itself or the libary ?! But I also have the same problem with the inverted text. The second libary from ruelj2 doesnt work anyway and looks very strange on my screen.

maybe someone can help me.

it would be very nice
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: dromo on Apr 20, 2015, 10:31 pm
and GraXXoR you have only to change one little thing in \Arduino\libraries\TFTLCD\glcdfont:

"const static unsigned char  font[] PROGMEM = {" just add the "const :) then it should work
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: Andfj on Sep 22, 2015, 10:26 am
so here's the final working Libraries and exemples! I added a tool to convert image for creating bit map!
When I use your libraries. My screen just goes up and down in brightness. I can't get any colors on it. When I bought the screen it said "LCD driver: ILI9325 (datasheet) or ILI9328 (datasheet) controller with built in video RAM buffer" But I haven't been able to get any code recognise the driver. I also tried adding delays.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: zoomx on Sep 22, 2015, 09:48 pm
Try this page
http://misc.ws/2015/01/24/lcd-touch-screen-information/ (http://misc.ws/2015/01/24/lcd-touch-screen-information/)
The first thing to do is to identify the driver.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: Andfj on Sep 23, 2015, 11:25 am
Couldn't identify the driver. I'm giving up on this screen now. (Normally I wouldn't) but I need one to function for a project in school. So don't have more time.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: zoomx on Sep 23, 2015, 12:03 pm
In the page I linked there is a sketch to help to identify the driver.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: Andfj on Sep 29, 2015, 09:05 am
Yea, I used that link. And still couldn't determine it :) But on to a new lcd that works. No touch functions though.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: david_prentice on Sep 29, 2015, 09:32 am
Seriously,   if you used the diagnostic tool to identify the controller,   all you have to is say what ID that it found.   Ebay adverts often untrue.

Simply saying "it don't work" is not going to get any sensible advice.

Likewise,   it is wise to post a link to your actual display.    If it is a regular mcufriend style UNO shield,   it has a resistive touch screen on A1,A2,D7,D6 pins.

David.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: Wirregar on Jan 11, 2017, 07:24 am
I am joining the queue of people stuck with this display from mcufriend.com

No identifying information printed on the shield except the web address mcufriend.com.
it is supposedly a 2.8" TFT touchscreen (with SD Card reader). It looks just like so many others.

I cannot get the screen working
I can get the touch screen workmen and read values.
I have not tried the SD Ram Card, as I can't write to the screen.

When I run the "LCD ID Reader" sketch, I get an ID out of it:  0x4535.
When I run the Adafruit_TFTLCD graphics test sketch, it returns an ID of 0x4141

And a dump of the registers (from the LCD ID Reader test) are below;

Code: [Select]
Initializing LCD...
Reading ID...0x4535
Loading LCD registers...
Filling the screen...
Done filling...
If your screen filled red, you may be able to use the library at http://misc.ws
Register 0x00 : 0x4535
Register 0x01 : 0x0100
Register 0x02 : 0x0300
Register 0x03 : 0x1030
Register 0x04 : 0x0000
Register 0x05 : 0x0000
Register 0x06 : 0x0000
Register 0x07 : 0x0133
Register 0x08 : 0x0202
Register 0x09 : 0x0000
Register 0x0A : 0x0000
Register 0x0B : 0x0000
Register 0x0C : 0x0000
Register 0x0D : 0x0000
Register 0x0E : 0x0000
Register 0x0F : 0x0000
Register 0x10 : 0x1730
Register 0x11 : 0x0037
Register 0x12 : 0x0018
Register 0x13 : 0x1700
Register 0x14 : 0x0000
Register 0x15 : 0x0030
Register 0x16 : 0x0000
Register 0x17 : 0x0001
Register 0x18 : 0x0000
Register 0x19 : 0x0000
Register 0x1A : 0x0000
Register 0x1B : 0x0000
Register 0x1C : 0x0000
Register 0x1D : 0x0000
Register 0x1E : 0x0000
Register 0x1F : 0x0000
Register 0x20 : 0x0000
Register 0x21 : 0x0000
Register 0x22 : 0xF800
Register 0x23 : 0x0000
Register 0x24 : 0x0000
Register 0x25 : 0x0000
Register 0x26 : 0x0000
Register 0x27 : 0x0000
Register 0x28 : 0x0000
Register 0x29 : 0x0000
Register 0x2A : 0x0000
Register 0x2B : 0x0000
Register 0x2C : 0x0000
Register 0x2D : 0x0000
Register 0x2E : 0x0000
Register 0x2F : 0x0000
Register 0x30 : 0x0001
Register 0x31 : 0x0606
Register 0x32 : 0x0304
Register 0x33 : 0x0202
Register 0x34 : 0x0202
Register 0x35 : 0x0103
Register 0x36 : 0x0105
Register 0x37 : 0x0404
Register 0x38 : 0x0404
Register 0x39 : 0x0404
Register 0x3A : 0x0101
Register 0x3B : 0x0101
Register 0x3C : 0x0700
Register 0x3D : 0x0207
Register 0x3E : 0x0001
Register 0x3F : 0x0001
Register 0x40 : 0x0000
Register 0x41 : 0x0000
Register 0x42 : 0x007F
Register 0x43 : 0x0000
Register 0x44 : 0x0000
Register 0x45 : 0x0000
Register 0x46 : 0x0000
Register 0x47 : 0x0000
Register 0x48 : 0x0000
Register 0x49 : 0x0000
Register 0x4A : 0x0000
Register 0x4B : 0x0000
Register 0x4C : 0x0000
Register 0x4D : 0x0000
Register 0x4E : 0x0000
Register 0x4F : 0x0000
Register 0x50 : 0x0000
Register 0x51 : 0x00EF
Register 0x52 : 0x0000
Register 0x53 : 0x013F
Register 0x54 : 0x0000
Register 0x55 : 0x0000
Register 0x56 : 0x0000
Register 0x57 : 0x0000
Register 0x58 : 0x0000
Register 0x59 : 0x0000
Register 0x5A : 0x0000
Register 0x5B : 0x0000
Register 0x5C : 0x0000
Register 0x5D : 0x0000
Register 0x5E : 0x0000
Register 0x5F : 0x0000
Register 0x60 : 0x2700
Register 0x61 : 0x0001
Register 0x62 : 0x0000
Register 0x63 : 0x0000
Register 0x64 : 0x0000
Register 0x65 : 0x0000
Register 0x66 : 0x0000
Register 0x67 : 0x0000
Register 0x68 : 0x0000
Register 0x69 : 0x0000
Register 0x6A : 0x0000
Register 0x6B : 0x0000
Register 0x6C : 0x0000
Register 0x6D : 0x0000
Register 0x6E : 0x0000
Register 0x6F : 0x0000
Register 0x70 : 0x0000
Register 0x71 : 0x0000
Register 0x72 : 0x0000
Register 0x73 : 0xAAAA
Register 0x74 : 0xAAAA
Register 0x75 : 0x0000
Register 0x76 : 0x0000
Register 0x77 : 0x0000
Register 0x78 : 0x0000
Register 0x79 : 0x0000
Register 0x7A : 0x0000
Register 0x7B : 0x0000
Register 0x7C : 0x0000
Register 0x7D : 0x0000
Register 0x7E : 0x0000
Register 0x7F : 0x0000
Register 0x80 : 0x0000
Register 0x81 : 0x0000
Register 0x82 : 0x0000
Register 0x83 : 0x0000
Register 0x84 : 0x0000
Register 0x85 : 0x0000
Register 0x86 : 0x0000
Register 0x87 : 0x0000
Register 0x88 : 0x0000
Register 0x89 : 0x0000
Register 0x8A : 0x0000
Register 0x8B : 0x0000
Register 0x8C : 0x0000
Register 0x8D : 0x0000
Register 0x8E : 0x0000
Register 0x8F : 0x0000
Register 0x90 : 0x0010
Register 0x91 : 0x0000
Register 0x92 : 0x0000
Register 0x93 : 0x0003
Register 0x94 : 0x0000
Register 0x95 : 0x0101
Register 0x96 : 0x0000
Register 0x97 : 0x0000
Register 0x98 : 0x0000
Register 0x99 : 0x0000
Register 0x9A : 0x000A
Register 0x9B : 0x0000
Register 0x9C : 0x0000
Register 0x9D : 0x0000
Register 0x9E : 0x0000
Register 0x9F : 0x0000
Register 0xA0 : 0x0000
Register 0xA1 : 0x0000
Register 0xA2 : 0x0002
Register 0xA3 : 0x0000
Register 0xA4 : 0x0000
Register 0xA5 : 0x0000
Register 0xA6 : 0x0000
Register 0xA7 : 0x0000
Register 0xA8 : 0x0000
Register 0xA9 : 0x0000
Register 0xAA : 0x0000
Register 0xAB : 0x0000
Register 0xAC : 0x0000
Register 0xAD : 0x0000
Register 0xAE : 0x0000
Register 0xAF : 0x0000
Register 0xB0 : 0x0000
Register 0xB1 : 0x0000
Register 0xB2 : 0x0000
Register 0xB3 : 0x0000
Register 0xB4 : 0x0000
Register 0xB5 : 0x0000
Register 0xB6 : 0x0000
Register 0xB7 : 0x0000
Register 0xB8 : 0x0000
Register 0xB9 : 0x0000
Register 0xBA : 0x0000
Register 0xBB : 0x0000
Register 0xBC : 0x0000
Register 0xBD : 0x0000
Register 0xBE : 0x0000
Register 0xBF : 0x0000
Register 0xC0 : 0x0000
Register 0xC1 : 0x0000
Register 0xC2 : 0x0000
Register 0xC3 : 0x0000
Register 0xC4 : 0x0000
Register 0xC5 : 0x0000
Register 0xC6 : 0x0000
Register 0xC7 : 0x0000
Register 0xC8 : 0x0000
Register 0xC9 : 0x0000
Register 0xCA : 0x0000
Register 0xCB : 0x0000
Register 0xCC : 0x0000
Register 0xCD : 0x0000
Register 0xCE : 0x0000
Register 0xCF : 0x0000
Register 0xD0 : 0x0000
Register 0xD1 : 0x0000
Register 0xD2 : 0x0000
Register 0xD3 : 0x0000
Register 0xD4 : 0x0000
Register 0xD5 : 0x0000
Register 0xD6 : 0x0000
Register 0xD7 : 0x0000
Register 0xD8 : 0x0000
Register 0xD9 : 0x0000
Register 0xDA : 0x0000
Register 0xDB : 0x0000
Register 0xDC : 0x0000
Register 0xDD : 0x0000
Register 0xDE : 0x0000
Register 0xDF : 0x0000
Register 0xE0 : 0x0000
Register 0xE1 : 0x0000
Register 0xE2 : 0x0000
Register 0xE3 : 0x0000
Register 0xE4 : 0x0000
Register 0xE5 : 0x0000
Register 0xE6 : 0x0000
Register 0xE7 : 0x0000
Register 0xE8 : 0x0000
Register 0xE9 : 0x0000
Register 0xEA : 0x0000
Register 0xEB : 0x0000
Register 0xEC : 0x0000
Register 0xED : 0x0000
Register 0xEE : 0x0000
Register 0xEF : 0x0000
Register 0xF0 : 0x0000
Register 0xF1 : 0x0000
Register 0xF2 : 0x0000
Register 0xF3 : 0x0000
Register 0xF4 : 0x0000
Register 0xF5 : 0x0000
Register 0xF6 : 0x0000
Register 0xF7 : 0x0000
Register 0xF8 : 0x0000
Register 0xF9 : 0x0000
Register 0xFA : 0x0000
Register 0xFB : 0x0000
Register 0xFC : 0x0000
Register 0xFD : 0x0000
Register 0xFE : 0x0000
Register 0xFF : 0x0000


When running the LCD ID reader sketch (V1.2) The top 1/4 of the screen fills with RED, the rest stays as random colour horizontal lines. (see attached photo)
When using any other sketch, no screen update appears, the screen is a dull white.


Any pointers from anyone?

Thanks
Darryl
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: david_prentice on Jan 11, 2017, 08:04 am
You have an LGDP4535 controller.   It is supported by MCUFRIEND_kbv library.   There might be other libraries.   

Why not Google for Arduino LGDP4535 ?

David.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: Wirregar on Jan 11, 2017, 08:09 am
You have an LGDP4535 controller.   It is supported by MCUFRIEND_kbv library.   There might be other libraries.   

Why not Google for Arduino LGDP4535 ?
I will - Now that I have info to help me.

thank you
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: Wirregar on Jan 11, 2017, 08:23 am
You have an LGDP4535 controller.   It is supported by MCUFRIEND_kbv library.   There might be other libraries.   

Why not Google for Arduino LGDP4535 ?

David.
And success - Thank you.

Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: david_prentice on Jan 11, 2017, 09:21 am
The LGDP4535 can not do Band Scroll.   Everything else should work.

Please report if anything else does not work properly.
I do not own a LGDP4535 Shield.   I have to rely on User feedback. 

David.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: Wirregar on Jan 11, 2017, 11:06 am
The LGDP4535 can not do Band Scroll.   Everything else should work.

Please report if anything else does not work properly.
I do not own a LGDP4535 Shield.   I have to rely on User feedback. 

David.

Thanks David,
Dont think I will be using Band Scroll, so that shouldn't effect me.

I did note that although I am using a shield, I had to disable  the use shield option in AdaLGDP4535TFTLCD.h

Code: [Select]

// **** IF USING THE LCD BREAKOUT BOARD, COMMENT OUT THIS NEXT LINE. ****
// **** IF USING THE LCD SHIELD, LEAVE THE LINE ENABLED:             ****

//#define USE_ADAFRUIT_SHIELD_PINOUT 1


If I enabled this, I had compile errors, if I disabled this, and use the following;

Code: [Select]

Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);
// If using the shield, all control and data lines are fixed, and
// a simpler declaration can optionally be used:
// Adafruit_TFTLCD tft;


it worked.  Is this known?

Do you want a LGDP4535 Shield?  Happy to send you one..

Rgds,
Darryl

Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: david_prentice on Jan 11, 2017, 12:16 pm
My library is called MCUFRIEND_kbv.   Some Beta versions may disable SUPPORT_4535.

My standard test sketch (graphictest_kbv.ino)  will only "fit" on a Uno if I disable some less common controllers.  Your Mega2560 has got plenty of memory.   

It looks as if you are using a hacked Adafruit_TFTLCD library.   Please post a link to the actual library that you found,

You can run my example sketch and just report whether everything works.
There is no point in me having a shield on my desk if everything is ok.
Even then,  it is reasonably easy to test things remotely.

David.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: Wirregar on Jan 11, 2017, 12:35 pm
I used this library;

AdaLGDP4535TFTLCD (http://forum.arduino.cc/index.php?topic=314912.0) found on the arduino forum.

It Seems to work ok so far.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: Wirregar on Jan 11, 2017, 01:13 pm
My library is called MCUFRIEND_kbv.   Some Beta versions may disable SUPPORT_4535.

My standard test sketch (graphictest_kbv.ino)  will only "fit" on a Uno if I disable some less common controllers.  Your Mega2560 has got plenty of memory.    

It looks as if you are using a hacked Adafruit_TFTLCD library.   Please post a link to the actual library that you found,

You can run my example sketch and just report whether everything works.
There is no point in me having a shield on my desk if everything is ok.
Even then,  it is reasonably easy to test things remotely.
Ok, so I downloaded and installed MCUFRIEND_kbv from Github
I am running a UNO by default so all tests below are on a UNO with my TFT shield (LGDP4535)

Here is the result of your example files (loaded from examples folder, not modified and compiled/run);

aspect_kbv - Nothing on screen - Output on Serial Monitor "ID = 0x4535"
graphictest_kvb - Nothing on screen - Output on Serial Monitor "ID = 0x4535"

LCD_ID_readreg - Nothing on Screen - Serial Monitor Output below;
Code: [Select]

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)

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


readpixel_kbv - Nothing on Screen - output on Serial Monitor: "readID = 0x4535"
scroll_kbv - Nothing on Screen - Nothing on Serial Monitor
testcard_kbv - Nothing on screen - Output on Serial Monitor: "TFT ID = 0x4535"
Touch_shield_kbv - Nothing on Screen - Output on serial Monitor;
Code: [Select]

Found unknown LCD driver
ID=0x4535
Screen is 240x320
Calibration is:
LEFT = 920 RT  = 150
TOP  = 940 BOT = 120
Wiring is: PORTRAIT
YP=15 XM=16
YM=7 XP=6


Thats about it, some of the others, similar result, nothing on screen with any example.

I didn't run any SD sketches, I haven't any SD libraries loaded. and I skipped a few touchscreen ones as there no screen display, I cant follow screen prompts for touchscreen alignment/testing.


Hope that helps.
Thanks


Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: david_prentice on Jan 11, 2017, 03:33 pm
As I explained in message #55,  some "less usual" controllers are disabled in the library because it gets too big for a Uno.   (the library supports over 40 controllers)

The library that you have installed is v2.9.2-Beta
I have just updated the Master on GitHub to v2.9.3-Beta

Please exit the IDE.
Delete the MCUFRIEND_kbv folder from the libraries folder.

Run the IDE again.   Reinstall the library from the Sketch menu.   v2.9.3 should be found by the Library Manager.   The LGDP4535 is "enabled" in the updated library.

David.
Title: Re: Looking for LCD GURU - s6d0139 driver need init tips - 2.6" LCD from ebay
Post by: Wirregar on Jan 12, 2017, 01:25 am
Thanks David, I reloaded the libraries (Note- they weren't found via the library manager, I manually added them from GitHub).

Re-ran the tests, all is good, in fact it is great, seems to be faster than the other library and your examples show more options in use. 

I'm converting everything to mcufriend_kbv now,
Thank you.