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

Thread: Any small LCD screen that works well with Teensy 4?

  1. #1
    Junior Member
    Join Date
    May 2014

    Any small LCD screen that works well with Teensy 4?

    I would like to attach a small LCD or OLED screen to a Teensy 4. For example, this 1.8" SPI color screen (monochrome may also be ok).

    Any recommendation for graphics library and a small screen that work well with Teensy 4? I need to display text and a simple scrolling graph with a few updates per second at most.

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Ayer Massachussetts
    The main thread where various displays are discussed, including ones you mentioned is at (I tried to jump to a page where they were discussing the 240x240 display (2nd one in your list):

    I have that display and I was able to run that display (using the ST7789_t3 driver and the program they mentioned). Note that particular display does not have a chip select (CS) pin, so if you use it, you won't be able to put anything else on that particular SPI bus. There are other displays out there with a CS pin (Adafruit for instance makes 2 of the 240x240 displays in different sizes and the 320x240 display).

    Note, I am out of town right now, and I won't be returning until Monday night, so I can't retest it with the official release.

    I bought this particular display from Amazon:

    Here are the Adafruit displays:

    I have the small one, and I think I tested it on the T4, but I can't check until I get back.

    Note, on the T4, you only have one fast CS pin to optimize these displays. One of the people in the thread above mentioned running two of the displays on two separate SPI buses. For the first SPI bus, the 'fast' CS pin is pin 10.

  3. #3
    Member ETMoody3's Avatar
    Join Date
    Mar 2014
    New Ulm, Mn
    Wow, 3$ from the Amazon vendor via slow boat.

    Just sent for two. ( *always* buy a spare)

  4. #4
    Junior Member
    Join Date
    May 2014
    Thanks Michael, this is very useful information.

    I don't need to run anything else with SPI so I presume that CS is not an issue for my application.

    I just ordered a T4 here and two 1.8" 128x160 ST7735 from Aliexpress

    A few more questions for you if you don't mind...

    1. Are these the libraries I should use?

    2. I would like to use that screen in landscape mode. Do these libraries support screen rotation?

    3. Does the Adafruit GFX library has the concept drawing to a buffer and then flushing it to the screen? If not, is flickering a concern? (I plan to do at most 3-5 updates a sec)

    4. I need to sample an A/D continuously at ~5-10khz so this will probably be done in counter/timer interrupt. Do you know if the graphics library will interfere with that interrupts? (e.g. disabling it for long time).

    5. Is arduino IDE a reasonable IDE for Teensy 4 projects? (I like it because of easy of installation).

  5. #5
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    @zapta - Libraries - ST7735_t3 library is installed with Teensyduino. Not sure if we have released a new version of Teensduino since Paul took in my previous PR, which added support for running the ones without CS pins. I know there is still one outstanding PR for T4 (

    Most of the still pending PR has to do with T4 when you do something like: tft = new ST7789_t3(...) where the object is created in the heap and issues associated with DMA and the like from this memory...

    To the questions

    1) I believe that there may soon be a new Teensyduino beta release of stuff that Paul was working on to better work with Serial monitor and the like. Not sure exactly when yet... But it will have both libraries in it...

    2) The library has the functions setRotation so yes you can get all 4 orientations.

    3) The ST7735_t3 library does have the concept of frame buffer, like I have in the ili9341_t3n library. You can turn it on and then all graphic primitives go to this memory instead of the screen. Then you can call tft.updateScreen() to update it from the frame buffer. There is an Asynchronous version tft.updateScreenAsync() which will do a DMA operation to update screen once and a way to turn it on for continuous, but that gets you back to flicker possibility.

    Note: In many cases you can avoid flicker without using frame buffer, by carefully planning out your graphics, such that each pixel that is updating is only updated once...

    4) Assuming you get your AToD working properly, the updating the display should not impact it... Of course if your AtoD code relies on your main loop to do it and your main loop is waiting for display to complete, that may be something to look at, but the update code should not be doing any disabling of interrupts.

    5) Arduino IDE - It gets the job done. There are others who prefer to go to other IDEs to do things. Sometimes I do it all within sublimetext, othes use VisualStudio...

  6. #6
    Junior Member
    Join Date
    May 2014
    Thanks Kurte, this is very useful.

    The LCDs should arrive in 2-3 weeks so I will sample whatever Teensduino will be available at that time and give it a try.

    I think that the pending issues should not be show stoppers in my case since the LCD I ordered has CS and I don't use 'new' in embedded code ;-)

    And thank you for all the great work of supporting these open source libraries.

Posting Permissions

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