ST7789Vi and Linux

Comments

12 comments

  • Steven Pisciotta

    I'm running the initialization as listed in the manual and I still have no activity. The SPI output is shown below. Earlier in the trace I set RESET low for 250ms and back high before sending the SPI data.

    0
  • Ted M.
    NHD Staff

    Hi Steven,

    Please refer to our example code on Github for the NHD-2.4-240320CF-BSXV-FT

    https://github.com/NewhavenDisplay/NHD-2.4-240320CF-BSXV_Example/blob/main/NHD-2.4-240320CF-BSXV/NHD-2.4-240320CF-BSXV.ino

    Regards,

    0
  • docsteer
    I recently got an ST7789Vi based display (NHD-2.4-240320CF) working on a Raspberry Pi as a framebuffer. Sample device tree overlay here if it helps:

    https://github.com/docsteer/nhd-2.4-240320CF-raspberry
    0
  • Ihab Awad

    Hi folks!

    I have an NHD-2.4-240320CF-CSXN#-F and would like to learn how to drive it from my Raspberry Pi. I am hoping for about 30 fps performance.

    https://newhavendisplay.com/2-4-inch-sunlight-readable-tft-without-touchscreen/

    1. If I use a serial interface (e.g. SPI), what frame rates should I expect?

    2. Is there example code or guidelines for using the parallel (MCU) interface? What frame rates would that produce?

    Ihab

    0
  • Cody J.
    NHD Staff

    Hello Ihab,

    NHD-2.4-240320CF-CSXN#-F only uses parallel interface. When pushing the parallel interface to its limit (pixel clock cycle of 66ns), you can theoretically achieve approximately 197fps. (Not taking blanking and other overhead into account) However, since the display only has a 60Hz refresh rate, it is recommended to lock your interface timing to achieve either 30 or 60fps. 

    NHD-2.4-240320CF-BSXV-F uses SPI. When pushing the SPI interface to its limit (serial clock cycle of 16ns), you can theoretically achieve approximately 100fps.  (Not taking blanking and other overhead into account) However, the same limitations apply from the parallel display noted above.

    You will need to check the maximum clock speed available on your Raspberry Pi and related interfaces.

    If you have any questions, don't hesitate to ask.

    Best Regards,

    Cody J.

    0
  • Ihab Awad

    Thank you Cody! That's very helpful and encouraging! Is there example code that uses the parallel interface that I can learn from? It can be just a simple piece of "C" code. I don't need a framebuffer or X11 driver since my application draws directly to an in-memory buffer, which I can easily copy to the display.

    Ihab

    0
  • Cody J.
    NHD Staff

    Hello Ihab,

    We have some some Arduino example code on our GitHub page: NHD-2.4-240320CF-Cxxx_Example.

    Some older example code is available on our website as well: 2.4" TFT - ST7789 Controller

    Best Regards,

    Cody J.

    0
  • Ihab Awad

    Great thank you!!

    0
  • Ihab Awad

    Greetings folks. I am using your example code:

    https://github.com/NewhavenDisplay/NHD-2.4-240320CF-Cxxx_Example

    I have wired up my NHD-2.4-240320CF-CSXN#-F display as per the following:

    https://docs.google.com/document/d/19uVzLAgJj0jGkHMyoQxAFoSPemK3wM3PW2JKhrLxPq0/edit

    This is a photo of my setup:

    https://photos.app.goo.gl/KCWxWHpHr7wW1eo38

    I am using a 40-pin FPC breakout and using an NHD-TFT40 to generate the backlight current, via LEDK and LEDA.

    When I run the program, it does ... nothing.

    https://photos.app.goo.gl/5fyzBKKNiJR4co3z6

    I have built two different versions of my wiring and used two different Arduino boards. Is there something obvious I am doing wrong?

    Ihab

     

    0
  • Engineering Support
    Community moderator

    Hi Ihab,

    The NHD-2.4-240320CF-CSXN#-F display requires a 3.3V I/O logic level to drive the command and data lines. You may need to use logic level shifters from the Uno to the display, or change the 5V regulator on the Uno to a 3.3V regulator. 

    Best Regards,

    Ted

    0
  • Ihab Awad

    Oh you're kidding. :( I'm so sorry for making such a fundamental mistake! I have been using an ESP32 for years, with 3.3V logic levels. Thank you so much for the tip!!!!

    Ihab

    0
  • Ihab Awad

    Thank you very much for the support so far. I can report success! First, this is the display driven by an ESP32 development board. The Newhaven demo code is working well:

    https://photos.app.goo.gl/FSzsNZdYoLoC9o4r7

    Next, this is the same code adapted to a Raspberry Pi, using the pigpio (https://abyz.me.uk/rpi/pigpio/) library. I had to insert busy-waits in the code to avoid glitches, and even then the results are not perfect. I expect this is due to signal integrity issues with my hacky wiring, because the spec for the display itself indicates T_WC (write cycle) of 66 ns, or (theoretically) 98 frames per second.

    https://photos.app.goo.gl/bKichDnmigQKJnf19

    Ihab

     

    0

Please sign in to leave a comment.