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

Thread: Teensy 4.0 - what 9341 library to use?

  1. #1
    Junior Member
    Join Date
    Sep 2019
    Posts
    8

    Teensy 4.0 - what 9341 library to use?

    I am trying to figure out the pluses and minuses of the 3 main 9341 libraries that I know of:

    ILI9341_t3 ILI9341_t3DMA and the ILI9341_t3n

    I have a single tft I will put on SPI0, this particular TFT has no CS and it will be the only device on that bus for obvious reasons.
    I don't have any plans to use the other spi buses at this time.

    It looks like there have been merges between all of these libraries and it is unclear to me what library to choose.

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,421
    Hard to say? What ILI9341 display board is out there that does not have a CS pin? Note: All three of these you mentioned require the DC pin to be on a hardware CS pin, Some require that CS pin be on hardware CS (at least defined as such).

    ILI9341_t3 - This is the main one that ships with Teensyduino. I think the update to allow it to work on T4 was taken in for the latest release. Don't remember if I left in the requirement that DC be hardware CS pin (Only pin 10 on T4 SPI object)...

    ILI9341_t3n - This is the one I have done most my experimenting with. Also others like @mjs513 have also added other capabilities as well. What all has been added over ILI9341_t3? Support of all of the SPI busses, support for maybe not on hardware CS pins. Ability to have a logical frame buffer, that all of the graphic primitives write to, and then the ability to tell the system to updates screen from the memory image. The update can be synchronous, asynchronous one shot update, or continuous update... Ability to set offsets, and clip rectangle , and some other graphic functions. Downside is this still requires my secondary library SPIN... One of these days I might try to remove its usage.

    ILI9341_t3DMA - I am not sure what the state of Frank's library for T4? He was the first one to add the ability for frame buffer and DMA updates, which I liked the idesas and incorporated them into ILI9341_t3n.

    And you also of course have the ability to use the Adafruit_ili9341 library, which also works on T4 (or at least did).

  3. #3
    Junior Member
    Join Date
    Sep 2019
    Posts
    8
    Quote Originally Posted by KurtE View Post
    What ILI9341 display board is out there that does not have a CS pin?
    They are out there, the one I have is just a display without any touch or SD card socket. It works on 32u4 with adafruit and other libraries - I just set the CS to an unused pin and you cant have anything else on the bus but it works fine.

    I noticed this in the ILI9341_t3 library:
    "Modified begin to allow using display with an invalid (255) chip select #43"
    https://github.com/PaulStoffregen/ILI9341_t3/pull/43

    t3n sounds like what I would prefer to use, hopefully the ILI9341_t3n will work ok with nothing connected to CS.

    Thanks.

  4. #4
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,421
    Looks like I don't check for 255 in the ili9341_t3n, currently you can choose any valid in your case unused pin and it should work.

    If it becomes a problem, I could put in change, to not use CS pin. It would I think only impact the ::begin method as I would just not set the port/pin settings and as such all of the code would see that these are NULL and not try to set the CS Pin state.

  5. #5
    Junior Member
    Join Date
    Sep 2019
    Posts
    8
    t3n is working fine with CS not connected to anything, thanks for the help.

Posting Permissions

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