LCD Touch Screen Information

By | January 24, 2015

Most of the traffic I receive on this site is from people looking for additional information about the small, inexpensive touch screen LCDs commonly sold on eBay.  While I’m not an expert on these screens, I’ll be happy to help provide all of the information I can and update this post regularly.  I also ask that you assist me in compiling as much information as possible to make it easier for others to get their screens working.

Currently, the best source of information I have are my original posts:

Touch Screen Shield for Arduino UNO

Touch Screen Shield for Arduino Mega 2560

If you have gotten your LCD working, please consider submitting your screen’s information, so we can begin to identify working code to match specific screens.

Thank you for you sharing your information!

Additionally, if you have a completed a project using one of these screens and want to share it here, please contact me.

Identifying the Right Library

The hardest part of using the Arduino touch screen shields sold on eBay is identifying exactly what type you have and which library to use.  Often, screens that look exactly the same behave slightly differently.  For example, the direction in which they write to the screen may differ from one unit to the next, resulting in inverted images without modifying the code.  My hope is to identify the screens that exist and correlate them with the appropriate library.

To that end, I am providing the following sketch, which will attempt to read the driver code from the screen’s ROM.  It does not rely on any additional libraries and should work with many of the screens currently available on eBay.

Click here to download: LCD_ID_Reader Version 1.2
(Refreshed Jan. 29th, 2015.   If you don’t see a version number in your copy or it differs from above, please download again. )

The following is the best information I’ve received so far about which drivers might be working for which screens.  I will continue to add more as it becomes available.

 

What’s New?

Not a lot.  I haven’t done anything with the screens I have in some time.  The two that I have worked, so it’s difficult for me to surmise why others don’t.  If our friends at mcufriend.com or another supplier want to send me a an assortment of screens, I’ll gladly go through them and document what I find during my spare time.

 






63 thoughts on “LCD Touch Screen Information

  1. Mikael

    Hi
    Got one of these shields from mcufriend.com and can NOT get it to work.
    Your LCD_ID_reader gives me 0x0154 every time. Googling it makes me no wiser.
    Have you got any idea?
    I’m using an UNO R3 arduino compatible.

    Reply
    1. Justin Post author

      Thank you for your comment. I don’t have any more information right now, but I’m trying to find out more about this screen. Hopefully, I’ll get one to experiment with.

      Reply
  2. Volkan

    sorry my english.
    i have bought 2 lcd screen 2.4″.
    one chip 7783 working SWTFT-Shield library.
    one chip id 154 (0x0154) not working (SWTFT-Shield and TFTLCD) .

    Reply
    1. Justin Post author

      Thank you, Volkan. I’m looking for more information about that screen and hoping to get one to play with.

      Reply
  3. Justin Post author

    Please download and test again with the LCD_ID_Reader sketch above. I don’t have a screen to experiment with, but I attempted to initialize the screen and do a fill. If it works, we may be on the way to a solution.

    Reply
  4. hepoun

    Hi Justin, I just downloaded current version of LCD_ID_Reader, here goes output to serial:

    Initializing LCD…
    Reading ID…0x0154
    Filling the screen…
    Done filling…
    If your screen filled red, please report it at http://misc.ws/lcd_information
    There is currently no known working library.

    Unfortunately, my screen stayed all white. 🙁
    I don’t eighter know any working library…

    Anyway, your site is very good source, thumbs up 🙂

    Reply
    1. Justin Post author

      Well, it was worth a try. I’ll wait until I actually receive a similar LCD to see if I can make it work. Thank you very much for the feedback.

      Reply
    1. Justin Post author

      Very nice! Thank you. I’ll post the link to the code up above.

      Reply
  5. CurvingCrayon

    Cheers man!!
    I had bought my screen for $4 off eBay and I was really starting to worry that it wasn’t gonna work. My screen had the driver code 0x0154 and the library worked awesome with it!!

    – CurvingCrayon

    Reply
  6. JOsh

    Hello!

    I too got 0x0154 and was able to get the graphicstest.ino to actually run–first proof this screen work! I got mine from Banggood.com. When I try to load tftpaint I get an error that TouchScreen does not have a type. I think this may be due to the included TouchScreen.h. Where do I find this file? I do not think I have it!

    Thank you!!!

    Reply
      1. ash

        if you have followed volkan’s instructions,

        use the tftpaint example in the tftlcd library

        to get touchscreen working change these lines:

        #define YP A1 // must be an analog pin, use “An” notation!
        #define XM A2 // must be an analog pin, use “An” notation!
        #define YM 7 // can be a digital pin
        #define XP 6 // can be a digital pin

        found correct pins using schematic pdf found on mcu website

        http://www.mcufriend.com/download/arduino2.4.pdf

        should work on uno and mega as long as correct pin_magic.h used

        Reply
  7. sru

    Hi,
    I too used this LCD tft to display the data from the sensor..used the library from
    https://github.com/Smoke-And-Wires/TFT-Shield-Example-Code/tree/master/SWTFT-Shield
    I am getting the right values displayed but in mirrored form.Used the same library to display a string and its displayed properly. Is it nythng to do with the tft.setRotation function? without using this function i m not getting the sensor values displayed but if used its giving mirrored values. someone lease help me regarding this.

    Reply
  8. Jonny

    I also got the LCD driver id 154 using your test program, so I tried the https://github.com/samuraijap/TFTLCD-Library. It did not work, nothing was displayed.

    Turns out the latest version on Github has it setup for 240×400 in the Adafruit_TFTLCD.cpp file.

    You just need to change one line to get it to work:
    #define TFTHEIGHT 320

    Reply
  9. michael

    If you are having problems with a 24 inch display and it uses a Samsung S6D0154x display controller, then this collection of files from Adafruit and Ardunino along with a change in the pin allocation may work for you.

    https://github.com/optimho/S6D0154X-Display-Driver

    Problem is that there seems to be a few variations and different controllers for the similar looking 24 inch display. I purchased the displays from http://www.aliexpress.com/snapshot/6482008300.html?orderId=65678906846588 and spent then spent a lot of time trying to get the thing to work.

    Reply
  10. Kevin

    I have an S6D0154 display as reported by the LCD_ID_Reader program.

    And I downloaded and ran https://github.com/optimho/S6D0154X-Display-Driver code.
    I changed TFTHEIGHT to 320 because it is a 2.4″ Screen and I enabled the line
    #define USE_ADAFRUIT_SHIELD_PINOUT 1

    When I run the program however, it reports an unknown driver chip:

    TFT LCD test
    Using Adafruit 2.8″ TFT Arduino Shield Pinout
    TFT size is 240×320
    Unknown LCD driver chip: 101
    If using the Adafruit 2.8″ TFT Arduino shield, the line:
    #define USE_ADAFRUIT_SHIELD_PINOUT
    should appear in the library header (Adafruit_TFT.h).
    If using the breakout board, it should NOT be #defined!
    Also if using the breakout, double-check that all wiring
    matches the tutorial.

    NOTHING IS DISPLAYED ON THE SCREEN (all white).

    Reply
  11. alfelipe

    I’m using a 2.4 TFT-LCD from Banggood. They said the shield uses Spfd5408 controller with built in video RAM buffer. But the board layout of the shield I received is different
    .
    http://www.sepca-sctfe.org/downloads/received-board-layout.jpg
    .
    This is the shield in banggood:
    .
    http://www.banggood.com/UNO-R3-ATmega328P-Board-2_4-Inch-TFT-LCD-Screen-Module-For-Arduino-p-945755.html
    .
    After running your sketch says:
    .
    Initializing LCD…
    Reading ID…0x0000
    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
    .
    But screen remains “noisy”, nor “red”.

    Reply
    1. Chris

      Hi.
      I ordered the same screen from Banggood as alfelipe and get the same output with the noisy screen – white with a lot of random colored dots all over it – when I run your sketch. It also reports an id of 0x0000. I then came across this post on Banggood by “Leescratchwood”:

      “I bought my 3 devices end of march. The are based on the SAMSUNG S6D04H0X controller. Consult post #7 here http://forum.arduino.cc/index.php?topic=314613.0 download the file TFT_Shield.zip, install it in the arduino IDE and you should get an incredibly fast demo on your screen 😉 Thanks to all who contributed in getting this thing to work properly !!!!! ”

      I tried this and it worked for me (I found it in post #11).

      Chris.

      Reply
  12. Rakesh

    For S6D0154 to work with the code from https://github.com/samuraijap/TFTLCD-Library :

    1) Do not remove the comment (even if its a SHIELD)

    //#define USE_ADAFRUIT_SHIELD_PINOUT 1

    2) Change TFTHEIGHT to 320 from 400

    #define TFTHEIGHT 320

    Works good on Arduino 1.6.3 for me…. Testing out the Touchscreen part now !

    Reply
  13. Charles Biggs

    Nothing seemed to work; I tried your lcd_ID_Reader, it returned a, ID of 0X4535, the screen painted colored horizontal lines in random colors and then painted a faint red, almost pink, band across the top third of the screen in landscape mode. I can’t find a reference to 4535 driver, and MCUFRIEND site is apparently gone; no pages will load. The seller says, “Virtual keys on the screen can be driven using a mobile phone motherboard, and it can be used as the phone’s screen.
    On this type of product, if it is used in the arduino (English name which contains) above, you can find information on some local forums’ data.
    Arduino official website also includes relevant instructions.
    Hope this can help you.” The board has several printed icons along the bottom like a smartphone display.

    Reply
  14. Charles Biggs

    Added: I finally got it working somewhat with the library from Smoke and Wires, except the display is white across the bottom 1/5 or so of the screen, and everything is reversed. The lines and boxes tests are apparently writing to the white area, and the test text seems to be partially hidden under it. Could it be that the define height is wrong? I’m not sure which is height, the long dimension, or the short? Practical me says it matters whether the display is in landscape or portrait mode, correct me if I’m wrong, so I can learn more. I’m not sure where the height and width are defined; I’m going to start digging in the .h and .cpp files from Smoke and Wires.

    Reply
    1. Wire

      I do have the same drive chip 4535 and I use Smoke and Wire. Its the same. Did you find a solution?

      Reply
  15. zoomx

    I got a shield marked Kedei, used your sketch to identify the chip and got 0x0303.
    I made the modification you wrote (the modifications suggest that it is a clone of 0x9341 with control pins swapped) but unfortunately it didn’t work.
    The modified Adafruit libraries give an id of 0x0343 so I added also this ID with no luck.
    Always I get only a white screen with only a brief flickering when the begin function is executed.

    Reply
    1. Vivilatulipe

      Hi,
      I have the same problem and no solution too. I think the driver 9341 is not made for that screen (240x400p 2.4″) and the ILI9327 does’nt work.

      Reply
        1. zoomx

          Thanks Vivilatulipe! I am the same guy ho post there the drivers. I posted also here using the form.

          Reply
  16. staqUUR

    Hi. For those of you who have a SPFD5408-based unit (Chip ID 0x9120), I have a working TFT library. The trick is to get the correct initialization values. I got them from an old version of Henning Karlsen’s UTFT library (2.72 Plus. Seems the newer versions have discontinued SPFD5408 support!). As soon as i get the touchscreen working, I´ll upload the results.

    Cheers

    Reply
  17. staqUUR

    Well, I managed to get the touchscreen working. Where and how can I post the code?

    Cheers

    Reply
  18. Ramkumar

    Dear Justin,
    First of all i would like like to thank you for your wonderful work. Recently i bought a 3.5 inch Tft touch screen display from aliexpress http://www.aliexpress.com/snapshot/6728521922.html?orderId=67759674769452/. when i run your sketch im getting the following response
    Initializing LCD…
    Reading ID…0x0404
    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

    But my screen is still white. Kindly help me in finding the tft lcd driver Ic . i googled 0x0404, but i am not getting anything. Please help.

    Regards,
    Ram

    Reply
    1. Antonio

      Did you find a library for that lcd?, i have the same one with the same 0404 code, but i can’t make it work.

      Reply
  19. Maarten

    for the 0x0154

    I got my shield working with this video:
    https://www.youtube.com/watch?v=OmOU5Y3gZkU

    The library files used in the video can be found here:
    http://www.moleandroid.com/arduino-tutorial-2-how-to-setup-mcufriend-2-4-lcd-tft-libraries-and-avoid-white-screen/

    The only thing I needed to change was the resolution in the Adafruit_TFTLCD.cpp file. so that everything fitted on the screen.
    I haven’t tested the touch screen properly.

    Hope this helps for someone.

    Reply
  20. Pingback: Mcufriend LCD TFT shield con ILI9325: Test librerie | zoomxtech

  21. robbie

    hi i have tried for many hours now to get my screen to work with many different library files but still no joy i would like some help with it the screen reads ID 0xC505 and that i may be able yo use library at http:// misc.ws but i have tried this still notting the screen stays white can someone please help me out thanks

    e mail robbiezxc at hotmail dot com

    Reply
  22. Kyaw Kyaw

    Hi
    First of all i would like like to thank you for your wonderful work. Recently i bought a 2.4 inch Tft touch screen display from china. (http://www.mcufriend.com 2.4inch TFT LCD Shield) print on this PCB.
    I used with uno.

    After running your sketch says:
    .
    Initializing LCD…
    Reading ID…0x9595
    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

    But my screen is still white. Kindly help me in finding the tft lcd driver Ic .
    i googled 0x9595, but i am not getting anything. Please help.

    Reply
  23. Kyaw Kyaw

    Recently i bought another 2.4 inch Tft touch screen display from china. (www.mcufriend.com 2.4tftlcd for arduino uno 9335) print on this PCB.
    I used with uno.

    After running your sketch says:
    .
    Initializing LCD…
    Reading ID…0xC505

    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

    But my screen is slowly display red. Kindly help me in finding the tft lcd driver Ic .
    i googled 0xC505, but i am not getting anything. Please help.

    Reply
    1. alain2003

      Me too i bought this damned http://www.mcufriend.com 2.4tftlcd from aliexpress.
      several weeks now i tried every possible library and non of them working with this.
      After running your sketch gets this:
      Initializing LCD…
      Reading ID…0xC505
      The only library thats seems working for this is descrived here http://misc.ws/2013/11/08/touch-screen-shield-for-arduino-uno/#comment-41
      library:
      http://www.airspayce.com/mikem/TFTLCD-mikem.zip
      but still had issues as it won’t compile
      so i opend the glcdfont.c and made change like this:
      from:
      static unsigned char font[] PROGMEM = {
      to:
      static unsigned const char font[] PROGMEM = {
      then used the graphic test sketch and WORKS! but encounter another problem: text was reversed
      i deleted the TFTLCD.cpp and used the TFTLCD.cpp.orig (removing the.orig at the end) and all was working!!
      the only thing now is that touchscreen is still not working.

      Reply
  24. Uplink

    I have a screen printed 9335. Your ID reader reads it as 0x9335. The Adafruit TFT library reads the ID as 0xC0C0.

    The screen does turn red when your ID reader runs, but when I load the “graphicstest” example nothing happens. The “tftpaint” example fails to compile because Touchscreen.h doesn’t exist, and I can’t try “MyBitmapExperiment” as I don’t have an SD card available.

    What should I do?

    This is what I got: http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=221831832114

    Reply
    1. Uplink

      I got tftpaint to build after getting the TouchScreen lib from Adafruit, and changing “Point” to “TSPoint”, but no touches are detected.

      Reply
    2. Uplink

      I stepped through the code of the library and that of the ID reader using hand and eyeball and tried differences.

      I found one: the ID reader has delayMicroseconds(10) between changing RW to LOW and HIGH, but the lib does not. I added that to the lib (vim: :%s,*wrportreg |= wrpin;,delayMicroseconds(10); &,g ) and now my LCD is working.

      The text appears to be rendered backwards, and I have no idea why #define INVERT_X doesn’t change that in anyway, but I’ll look into it after I get some sleep.

      Reply
      1. Uplink

        Nevermind on the INVERT_X define. I can’t do it in the application. The change has to go in TFTLCD.cpp

        Reply
      2. Uplink

        And one last thing and I’ll stop spamming your comment section: I got tftpaint going, and it looks like the X inversion applies to it too, but… its orientation is equivalent to TFT setRotation(1).

        In order to get tftpaint to make sense, these two changes are needed:

        in setup():
        after tft.initDisplay();
        tft.setRotation(1);

        in loop():
        after // turn from 0->1023 to tft.width
        replace
        p.x = map(p.x, TS_MINX, TS_MAXX, 0, tft.width());
        width
        p.x = tft.width() – map(p.x, TS_MINX, TS_MAXX, 0, tft.width());

        And it appears to have any pressure sensing too, even though tftpaint doesn’t make use of it.

        Reply
    3. Karl Fischer

      Hi. Had the same problem- though i am not sure if you have fixed it in the meantime. THe id-Reader information is correct. The 9341 doesn’t work. and theres no 9335 driver in the ADAfruit library. But the 932X is doing the job, so you have to force your mcu to accept it as the 0x9325. In the adafruit graphictest sketch you ca do this by placing

      a”identifier=0x9325;”
      right after the line
      “uint16_t identifier = tft.readID();” then it will run with the 9325 settings which worked for me.
      unfortunately my display was mirrored afterwards so i had to go in a little deeper and change the ss-register setting in the afadruit_tftlcd.cpp ( line 200) from 1 to 0 ( or to put it in an example:
      “ILI932X_DRIV_OUT_CTRL , 0x0000,” instead of “ILI932X_DRIV_OUT_CTRL , 0x0100,”

      Good luck anyways- hope you get it running.

      K/R
      Karl

      Reply
    4. Karl Fischer

      Ah- btw, to be not a complete as…….e:
      Thanks for this great page. It was one of my first stepstones to get the display running. I appreciate your work- It helped a lot.

      K/R
      Karl

      Reply
  25. Niclas

    Hi
    Thanks for some great compiled information about different driver chips.
    When running the tftpaint on my tft I just got the information that the driver was not supported. (0x1327)
    So I tried adding that driver to the first if (0x9325) and that worked when also changing the analog pin-setup!
    So for chip 0x1327 it is the same procedure as with 0x0303, but instead add it to the same if as 0x9325:
    (modifiy Adafruit_TFTLCD.cpp: else if (id == 0x9325) becomes: else if ((id == 0x9325) || (id == 0x1327)) modifiy examples: #define LCD_CS A0 #define LCD_CD A1 #define LCD_WR A2 #define LCD_RD A3 modify examples: else if(identifier == 0x9325) becomes: else if((identifier == 0x9325) || (identifier == 0x1327)))
    On the backside of my TFT it’s written:
    2.4 TFT LCD Shield
    Vision 1.0 2015/1/20
    http://kedei.taobao.com
    QQ:310953417

    I also had some problem with x-axis being mirrored for the touch. I could see in the code that if you’re sharing pins you need to change the directions of the touchscreens pins (pinMode(??, OUTPUT))
    But that didn’t work for me at all, the screen would just go white or get horizontal lines.
    The solution for me was to change:
    p.x = map(p.x, TS_MINX, TS_MAXX, tft.width(), 0);
    to
    p.x = map(p.x, TS_MAXX, TS_MINX, tft.width(), 0);

    Hope this info will help anyone stuck with their TFT

    Best regards
    Niclas Rådström

    Reply
  26. skrokar11

    Hello i have problem with working the screen properly.

    I run your ID reader and get this

    Initializing LCD…
    Reading ID…0x9335
    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

    I think i tried all of this libraries but nothink help me .
    Almost all of the libraries has #define LCD_CD A2 but i dnt have it on board i have #define LCD_RS A2 maybe there is problem . Only just your ID Reader has #define LCD_RS A2

    Reply
  27. koclok

    i tried your ID Reader, and my screen just fill reds.
    in back of my screen its write: 9335 http://www.mcufriend.com but my screen only fill red.
    its same problem like skrokar11. please help me

    Reply
  28. Milen

    Hi Justin,

    I would like to ask you for help.
    I bought a 2.4″ TFT shield from aliexpress.
    I tried a lot of libraries, but the display is always white.
    I have used you LCD_ID_Reader scpript and it give me the following result:
    Initializing LCD…
    Reading ID…0x6809
    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

    The screen is filled red, but I do not find exactly which library I should use

    Reply
  29. Grubi

    Have same problem as previous post from

    Kyaw Kyaw
    September 13, 2015

    Chip ID is 9595, and I try few different libraries, but without success. Any suggestions?

    Reply
  30. releyshic

    Yout program got me :
    “Initializing LCD…
    Reading ID…0x0000
    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
    Without Red screen. my display 2.8 mcufriend.com Under screen dont was write model

    Reply
  31. BRANDONLA

    Hi
    I bought an Kedei Taobao tft lcd and try to display the image store in the sd card together with my arduino mega, I made the modification mention above the the end result was a white screen.
    Please help, i tried many library and was not successful
    The connection made from tft lcd to arduino mega is a jumper cable.

    Reply
  32. bogdan68

    Hi.looked your blog by 2.4 TFT chip 9341.U I have such ekran.Zapustil at uint16_t identifier = 0x9341; // Need hardcode here (IC) But there is a Problem , double izobrazhenie.Mozhe tell you how to solve problemmu.Video https://youtu.be/YVo0v3PLSAA Thank you for your hard work .

    Reply
  33. Pingback: TFT TouchScreen Calibration - Blascarr

  34. omkar

    MY lcd driver is showing ID as 0000 is it possible or my LCD has some other problem

    Reply
  35. Claudio Francesconi

    hello i just bought a TFT ILI9431 shield version and i am looking for info to connect that to a ESP8266 (nodemcu board), do you think it would be possible? because all i found is for the TFT non-shield version

    thanks..
    bytheway, i am having problems with the touch part of the display…. the paint sketch doesnt work properly… i try to touch it with my finger but it’s quite unresponsive and, when it responds then it print out some dots in another x,y coordinates
    you think it could be an hardware problem or a code set-up?

    thanx

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *