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

Thread: ILI948x_t4_mm - An 8 bit parallel display driver for the Teensy MicroMod

  1. #1
    Senior Member
    Join Date
    Oct 2019
    Posts
    240

    ILI948x_t4_mm - An 8 bit parallel display driver for the Teensy MicroMod

    After being a member of this forum for the past 2-3 years, consuming the vast amount of knowledge & expertise from the very smart and talented forum members.. It's time for me to give back a little something.

    In the past few weeks I started to dig into FlexIO and DMA to try and understand how the hell it works in hopes of creating an 8 bit parallel display driver for the ILI9481/9486/9488.

    Thanks to all the help from forum member easone and threads by KurtE, miciwan and Paul - I have a proof of concept library available:

    ILI948x_t4_mm
    https://github.com/david-res/ILI948x_t4_mm
    Click image for larger version. 

Name:	mm_flexio_example.jpeg 
Views:	25 
Size:	184.8 KB 
ID:	26044

    This is a BASIC display driver - it has several setup function that will allow a user to set rotation, frame rate, invert display etc
    And it's main function allows a user to pass an array of pixels in 16 bit format (RGB565).

    This library has alot more work needed to get it working 100%, but as a proof of concept it's a great starting point.

    It utilizes FlexIO to create an 8 bit bus on the Teensy MicroMod
    It also utilizes DMA to offload the large transfers from the CPU, although a polling method can be used as well.

    The following Teensy MM pins are used to drive the display and cannot be changed:
    • pin 10 - WR
    • pin 40 - D0
    • pin 41 - D1
    • pin 42 - D2
    • pin 43 - D3
    • pin 44 - D4
    • pin 45 - D5
    • pin 6 - D6
    • pin 9 - D7


    For CS, D/C, RST pins, any GPIO pins can be used.

    The basic setup is explained in the Readme file under the repo and an example sketch has been provided as well.

    The next features to be added are a function to changed the bus speed - this directly affects the actual refresh rate, and I also intend to incorporate some simple functions to read data from the screen such as display make/model, setup config and GRAM content.

    There are still some glitches with DMA, so I encourage anyone and everyone to contribute in enhancing this library!

    Enjoy,
    David

  2. #2
    Member DIYLAB's Avatar
    Join Date
    Jun 2020
    Location
    Germany
    Posts
    64
    Hi David,

    Quote Originally Posted by Rezo View Post
    There are still some glitches with DMA, so I encourage anyone and everyone to contribute in enhancing this library!
    I would like to do, but buy a MicroMod?
    With the Teensy 4.1 probably does not work?

    Kind regards
    Bruno

  3. #3
    Senior Member
    Join Date
    Oct 2019
    Posts
    240
    This library will work only on the MicroMod.
    The Teensy 4.1 does not expose enough FlexIO pins to get enough contiguous pins on FlexIO 1 and 2.

  4. #4
    Member DIYLAB's Avatar
    Join Date
    Jun 2020
    Location
    Germany
    Posts
    64
    I think the MicroMod is nice, but the carrier plate is just too big for my projects.
    Maybe there will be something smaller at some point, wait and see.
    Unfortunately I can not handle M.2 sockets myself

    If there was the Teensy 4.2 with enough FlexIO pins for a parallel display and an SGTL5000, I'd order 1000+ of them right now, really

  5. #5
    Senior Member
    Join Date
    Oct 2019
    Posts
    240
    Technically it can be done on a Teensy 4.1 but without the use of DMA - so the transfers will hold up the main loop for 5-6ms on a full screen (480x320) update. But the current version of the library does not have the configuration for this yet.

    I actually prefer the MicroMod Teensy as it makes it much easier for me to remove the Teensy if needed and is square form factor does not limit me to a min width PCB for mounting it.

  6. #6
    Senior Member
    Join Date
    Jan 2015
    Location
    UK
    Posts
    179
    Hi David,

    Would it be easy to modify your library to drive a 16 bit LCD ?

    I like to drive a 5" 800 x 400 SSD1963 panel in 16 bit mode.

  7. #7
    Senior Member
    Join Date
    Oct 2019
    Posts
    240
    Quote Originally Posted by skpang View Post
    Hi David,

    Would it be easy to modify your library to drive a 16 bit LCD ?

    I like to drive a 5" 800 x 400 SSD1963 panel in 16 bit mode.
    On a MicroMod - can't be done at this time.

    On a Teensy4.1:
    You can strip down the library and make modifications to it so that it uses FlexIO3 instead of FlexIO2
    You need to update the pin setup for FlexIO, update the pointer size to the functions, and update the SHIFTCFG and SHIFTCTRL registers
    You need to rewrite the display init sequence for the SSD1963.
    You need to ditch the DMA portion as that's not supported on FlexIO3.
    It's not a hard task to anyone familiar with FlexIO, but not something I can work on at the moment unfortunately.

  8. #8
    Senior Member
    Join Date
    Oct 2019
    Posts
    240
    I just wanted to share a video of this library in action using LVGL v7.11
    It's set up with two 1/10 screen sized buffers (LVGL handles the switching) and DMA is used to transfer the data to the screen.
    Realistic FPS is around 45-65 frames per second with the bus speed set to 20Mhz
    https://drive.google.com/file/d/1x9e...ekMa0ZmNp/view

Posting Permissions

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