Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 21 of 21

Thread: How can I tell if a TFT LCD screen is compatible with Teensy3.6

  1. #1
    Senior Member
    Join Date
    Jun 2015
    Posts
    190

    How can I tell if a TFT LCD screen is compatible with Teensy3.6

    Hi,

    Apologies for what might sound like a stupid question - but ...

    How can I tell if a TFT LCD screen is compatible with Teensy3.6?

    A while ago, I bought a 3.5" TFT LCD touch screen for a Raspberry Pi project (so I know the screen works).

    Kuman 3.5 inch 320*480 Resolution Touch Screen TFT LCD Display With Protective Case + 3 x Heat sinks+ Touch Pen for Raspberry Pi 3 Model B, Pi 2 Model B & Pi Model B+ SC11
    https://www.amazon.co.uk/dp/B01FX790...135791_TE_item

    But I'm now wondering if I can use it in a Teensy (3.6) based project I have.
    I don't need the 'touch' screen functionality - it's literally just for displaying text.

    I have no real knowledge of TFT screens & how they work & what makes them compatible etc.

    This is the only other info I have on it:

    Type :TFT
    Interface :SPI
    Touch panel control chip : XPT2046
    The color index : 65536
    Backlight: LED
    resolving power: 320480 (Pixel)
    Size proportion: 8:5
    power waste: TBD
    Back facet current: TBD
    Working temperature (c): TBD

    Interface definition:

    TFT Pin number/ identification/ description

    1、17 3.3V ------ Power supply positive (3.3V power input)
    2、4 5V -- ---- Power supply positive (5V power input)
    3、5、7、8、10、12、13、15、16 NC --- --- NC
    6、9、14、20、25 GND ------- Power GND
    11 TP_IRQ ------ Touch panel interrupt, detect the touch panel is pressed down to a low level
    18 LCD_RS ------- Instruction / data register selection
    19 LCD_SI / TP_SI ------ LCD display / touch panel SPI data input
    21 TP_SO ----- SPI data output of touch panel
    22 RST ----- reset
    23 LCD_SCK / TP_SCK LCD -------- SPI clock signal for display / touch panel
    24 LCD_CS -------- LCD chip select signal, low level LCD
    26 TP_CS --------- The touch panel chip select signal, low level selection of touch panel

    If by any chance the answer is yes. Any idea what the corresponding Teensy pins would be pls.

  2. #2
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,874
    Edit - my initial post is pretty much completely wrong - see bmilliers post below for a more useful answer

    Original post:
    __________________________________________________ ______________
    The key bit of info is the control chip - XPT2046

    So google that + 'arduino library' is the key

    In fact I just googled the name along and the first hit I get is https://github.com/PaulStoffregen/XPT2046_Touchscreen

    So going to suggest that is a place to start, do double check all the pins since while the controller is the same whoever built the display may have swaped physical positions around, and it's also not impossible for there to be different resolutions etc you need to tweak if the chip is using different physical displays but in this case suspect you are good to go.
    Last edited by GremlinWrangler; 11-12-2016 at 10:52 PM. Reason: Didn't read the fine print

  3. #3
    Senior Member bmillier's Avatar
    Join Date
    Apr 2016
    Location
    Halifax, N.S. Canada
    Posts
    135
    @ bossredman- The XPT2046 is actually the touchscreen controller, not the TFT display controller. You say you don't care about touch. The existing Teensy/Adafruit TFT display library is written for the ILI9341 TFT controller. This controller is capable of 320 X 240 max resolution. Your display is twice this. I strongly suspect it uses a different controller, so the existing library won't work. That said, there is no reason the Teensy couldn't drive your display if you can find a suitable driver. I have not personally seen other, higher resolution driver libraries mentioned in this forum, but others may have info that might help in this respect.

  4. #4
    Senior Member
    Join Date
    Jun 2015
    Posts
    190
    Thanks both of you for your thoughts.

    I managed to find some more info on the display:
    Click image for larger version. 

Name:	TFT-info.JPG 
Views:	169 
Size:	57.1 KB 
ID:	8777

    So based on what you've said previously, do I need to try & find a driver/library for ILI9486/ILI9488L??

    Are drivers/libraries also specific to the mico-controller?

    ie is it possible there is an ILI9486 driver/library specifically for Arduino boards say & also a different driver/library for Teensy boards?

    At the end of the day, it's only becasue I have this screen already that I'm trying to get it to work with my Teensy project.
    Can anyone recommend any other screens than the ones on the PJRC Store that will definately work with the Teensy 3.6 that have drivers/libraries available.
    I'd prefer larger than the 2.2"/2.8" if possible as the screen will be viewed from the floor from a standing position.
    It willmainly be for displaying just text & numbers.
    [edit] Touch functionality is NOT required.

    Thanks

  5. #5
    Senior Member
    Join Date
    Sep 2013
    Location
    Hamburg, Germany
    Posts
    891
    There are RA8875 based 5" and 7" TFT displays, and sumotoy has written a library for those. I've also used one and wrote my own driver (for ugfx) so that display family might be an option.

    They are also available with other controllers which have been reported to work better than the 8875, but I have no experience with those.

  6. #6

  7. #7
    Senior Member
    Join Date
    Sep 2013
    Location
    Hamburg, Germany
    Posts
    891
    Yes, that combo would work. You can also buy a display module from China that includes a controller (iirc I bought one from buydisplay.com)

  8. #8
    Senior Member
    Join Date
    Jun 2015
    Posts
    190
    Quote Originally Posted by christoph View Post
    Yes, that combo would work. You can also buy a display module from China that includes a controller (iirc I bought one from buydisplay.com)
    Thanks again.

    Looks like buydisplay.com is US based & the China suppliers usually take about a month to deliver.
    I'm in the UK & want the display ASAP while I have some time to work with it.

    I'll keep looking - anyone know any UK base suppliers for these things pls?

    Thanks again.

  9. #9
    Senior Member bmillier's Avatar
    Join Date
    Apr 2016
    Location
    Halifax, N.S. Canada
    Posts
    135
    @bossredman: Since you are in the UK, you should take a look at the FT800 controller-based displays from FTDI, the UK firm that makes them. They have a very high performance TFT driver/graphics engine and you can get 3.5- 5" displays for less than the combo you listed above. FTDI supplies Arduino drivers for these displays- which I have used with the AVR chips found on Arduino boards in the past.
    I took one of my spare FT800 4.3" TFT modules and wired it up to a spare Teensy LC I had on hand. The FTDI demo programs worked fine when compiled for Teensy LC- no changes needed. Should work OK on T3.6 as well. When I get a chance I'll try it on my Kickstarter T3.5 module- I don't have the T3.6 though.
    here is a link to FTDI on line store page with several modules you could use:
    http://shop.clickandbuild.com/cnb/sh...es+-+Resistive

    The module I had on hand (which I tested with Teensy) was very similar to the FTDI ones, but comes from MikroElektronika in Serbia:
    http://www.mikroe.com/add-on-boards/display/connecteve/

    I wrote several magazine articles centred around these FTDI FT800 displays a few years back, and I was impressed with them. The library routines are a bit harder to understand than the Teensy ILI9341 library, but this controller is MUCH more powerful.

  10. #10
    Senior Member
    Join Date
    Jun 2015
    Posts
    190
    Quote Originally Posted by christoph View Post
    ... and sumotoy has written a library for those.
    DO you know what the library is called pls - couldnt find anything on github for sumo toy

  11. #11
    Senior Member
    Join Date
    Jun 2015
    Posts
    190
    Thanks bmiller - I'll take a look at these too.

  12. #12
    Senior Member
    Join Date
    Jun 2015
    Posts
    190
    Quote Originally Posted by bossredman View Post
    DO you know what the library is called pls - couldnt find anything on github for sumo toy
    Doh - must have done something wrong as now found it.

    https://github.com/sumotoy/RA8875

  13. #13
    Senior Member
    Join Date
    Jun 2015
    Posts
    190
    Hi,

    Following on from these discussions on TFT screens.
    I've been searching on mounting options and can't seen to find anywhere to order a bezel for these screens.

    Anyone know of a UK based supplier for a bezel for a 5" adafruit TFT screen pls?

  14. #14
    Junior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    18
    I'm not sure if you have solved your problem yet with the 3.5" RPi screen.

    I have one and have it working.

    The chip is an ILI9486
    The interface is 16 bit serial - it resembles notro's circuit at https://github.com/notro/fbtft/wiki/...erface-circuit

    My 9486 driver based on Steve Strong's (https://github.com/stevstrong/Adafruit_ILI9486_STM32)

    It is available at https://github.com/palmerr23/ILI9486_Teensy_Library

    **** "_Teensy" version @96 MHz on a Teensy 3.2 *********

    Code:
    Benchmark                Time (microseconds)
    Screen fill              833998
    Text                     58792
    Lines                    641303
    Horiz/Vert Lines         70196
    Rectangles (outline)     41054
    Rectangles (filled)      2033791
    Circles (filled)         419035
    Circles (outline)        526319
    Triangles (outline)      129835
    Triangles (filled)       731887
    Rounded rects (outline)  173153
    Rounded rects (filled)   2254039


    I also played with an update to the ILI9341_t3 library for this display.

    After disabling the _CS and _DC lines from SPI direct control (to avoid timing issues with the 16 bit serial interface) there was < 20% benefit and the code is nearly 3 times as long.

    The code for this _t3 library is at (not tidied up at all).

    https://github.com/palmerr23/ILI9486_t3

    The font files and other extras for the ILI9341_t3 library should work, but I haven't tested them yet. https://github.com/PaulStoffregen/ILI9341_t3

    **** "_t3" version @96 MHz on a Teensy 3.2 *******
    Code:
    Benchmark                Time (microseconds)
    Screen fill              833998
    Text                     58792
    Lines                    641303
    Horiz/Vert Lines         70196
    Rectangles (outline)     41054
    Rectangles (filled)      2033791
    Circles (filled)         419035
    Circles (outline)        526319
    Triangles (outline)      129835
    Triangles (filled)       731887
    Rounded rects (outline)  173153
    Rounded rects (filled)   2254039
    Last edited by palmerr; 02-07-2017 at 01:39 AM.

  15. #15
    Senior Member
    Join Date
    Jun 2015
    Posts
    190
    Hi - thanks for responding but I moved to a 5" RA8875 TFT display & managed to get that working fine.

    Appreciate your response though.

  16. #16
    Junior Member
    Join Date
    Oct 2016
    Posts
    18

    Question on the palerr version of the ili9486 driver

    Quote Originally Posted by palmerr View Post
    I'm not sure if you have solved your problem yet with the 3.5" RPi screen.

    I have one and have it working.

    The chip is an ILI9486
    The interface is 16 bit serial - it resembles notro's circuit at https://github.com/notro/fbtft/wiki/...erface-circuit

    My 9486 driver based on Steve Strong's (https://github.com/stevstrong/Adafruit_ILI9486_STM32)

    It is available at https://github.com/palmerr23/ILI9486_Teensy_Library

    **** "_Teensy" version @96 MHz on a Teensy 3.2 *********

    Code:
    Benchmark                Time (microseconds)
    Screen fill              833998
    Text                     58792
    Lines                    641303
    Horiz/Vert Lines         70196
    Rectangles (outline)     41054
    Rectangles (filled)      2033791
    Circles (filled)         419035
    Circles (outline)        526319
    Triangles (outline)      129835
    Triangles (filled)       731887
    Rounded rects (outline)  173153
    Rounded rects (filled)   2254039


    I also played with an update to the ILI9341_t3 library for this display.

    After disabling the _CS and _DC lines from SPI direct control (to avoid timing issues with the 16 bit serial interface) there was < 20% benefit and the code is nearly 3 times as long.

    The code for this _t3 library is at (not tidied up at all).

    https://github.com/palmerr23/ILI9486_t3

    The font files and other extras for the ILI9341_t3 library should work, but I haven't tested them yet. https://github.com/PaulStoffregen/ILI9341_t3

    **** "_t3" version @96 MHz on a Teensy 3.2 *******
    Code:
    Benchmark                Time (microseconds)
    Screen fill              833998
    Text                     58792
    Lines                    641303
    Horiz/Vert Lines         70196
    Rectangles (outline)     41054
    Rectangles (filled)      2033791
    Circles (filled)         419035
    Circles (outline)        526319
    Triangles (outline)      129835
    Triangles (filled)       731887
    Rounded rects (outline)  173153
    Rounded rects (filled)   2254039
    Downloaded the https://github.com/palmerr23/ILI9486_Teensy_Library version of this library and added to my environment; compiled the example to test it out, and It compiled fine but I am curious as to where the drawCirlce(), drawTriangle() and a few other functions are located? They are not in the .cpp file, not referenced in the .h file yet the code compiles fine. What am I missing here? I don't see any other included code that account for these routines. These functions are all referenced in the example code but I cannot find the source.

    Update:My Bad, seems they are in the Adafruit_gfx library and I missed the include.
    Last edited by msaine; 08-02-2017 at 02:15 AM. Reason: made error in post

  17. #17
    Junior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    18
    They're all in the Adafruit_GFX library.

  18. #18
    Junior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    18
    Replying to dslocum's post - that I can't see in this chain.

    The pin assignments are in the Adafruit_ILI9486_STM32.h file

    //Control pins |RS |CS |RST|
    #define TFT_CNTRL GPIOA
    #define TFT_RST PA1
    #define TFT_RS PA0
    #define TFT_CS PA4

    #define TFT_CS_MASK BIT4
    #define TFT_RS_MASK BIT0

    The Pinouts for the R-PI board are standard and are listen in bossredman's original post in this thread.

    Hope that helps

  19. #19
    Member
    Join Date
    Jan 2015
    Location
    Toms River, NJ USA
    Posts
    28
    THanks for the super quick reply! Not sure what happened to my post. POOF! :-(

    Actually, I was looking for the wiring for a Teensy 3.2, not an STM. I saw your #defines in the code, they didn't relate to the Teensy and my display which has different pin descriptions

    Anyway if it helps someone else, I managed to get it working using:

    Teensy 3.2 Display
    ------------------------------------
    13 SCLK
    12 MISO
    11 MOSI
    10 LCD_CS
    9 LCD_DC
    8 LCD_RST

    Cheers!

  20. #20
    Junior Member
    Join Date
    May 2018
    Posts
    2
    Quote Originally Posted by dslocum View Post
    THanks for the super quick reply! Not sure what happened to my post. POOF! :-(

    Actually, I was looking for the wiring for a Teensy 3.2, not an STM. I saw your #defines in the code, they didn't relate to the Teensy and my display which has different pin descriptions

    Anyway if it helps someone else, I managed to get it working using:

    Teensy 3.2 Display
    ------------------------------------
    13 SCLK
    12 MISO
    11 MOSI
    10 LCD_CS
    9 LCD_DC
    8 LCD_RST

    Cheers!
    hey

    I'm pretty new to all this, so forgive the noobness...
    I'm trying to get my 3.5 TFT screen working.
    I connected all the pins you mention (except for the SCLK, MISO and MOSI which relate to the SD card if I'm correct).
    But it doesn't work.
    My screen has TFTREAD and TFTWRITE pins, which I believe are the ones sending the data to display. Where am I supposed to connect them?
    I don't see any reference to them in the ILI9486_Teensy_Library

  21. #21
    Senior Member
    Join Date
    Oct 2015
    Location
    Roma (IT, EU)
    Posts
    189
    Most probably, TFTREAD = MISO, TFTWRITE = MOSI.
    MISO, MOSI and SCLK are necessary for the TFT to work. They are not exclusive of the SD card. The SPI interface is a bus: you connect the same SCK, MISO and MOSI to all the pertinent devices, then each device has its own CS=chip select.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •