LCD Module Comparison (Teensy 4.0 SPI Connection)

Sunday, January 3, 2021

LCD Teensy 4.0

t f B! P L

As my collection of SPI-connected LCDs has been growing, I decided to compare their connection methods and display quality. For the test environment, I used the graphicstest project included with Adafruit's LCD library, running on a Teensy 4.0 board.

List of LCDs for Comparison

Below is the list of SPI-connected LCD modules compared in this article.
Modules A, B, C, and E are mounted on base PCBs, while Module D is a bare panel with flex cable since a PCB-mounted version was not available.
In general, IPS panels offer wider viewing angles and less color shift compared to TN panels. In addition to resolution, the pixel pitch indicated by Dot Size is also a significant factor that greatly affects perceived image quality.

A
ST7735
1.8" 128x160
B
ST7735
0.96" 80x160
C
ST7789
1.3" 240x240
D
ST7789
2.0" 240x320
E
ILI9341
2.2" 240x320
Size (inch)1.8"0.96"1.3"2.0"2.2"
TypeTNIPSIPSIPSTN
Driver ICST7735SST7735SST7789VWST7789VWILI9341V
Resolution (Pixel)128 x 16080 x 160240 x 240240 x 320240 x 320
Active Area (mm)28.03 x 35.0410.80 x 21.7023.40 x 23.4030.60 x 40.8033.84 x 45.12
Dot Size (mm)0.219 x 0.2190.1350 x 0.13560.0975 x 0.09750.1275 x 0.12750.141 x 0.141
LCD Size (mm)34.70 x 46.7014.04 x 27.9526.16 x 29.2234.60 x 47.8040.10 x 55.20
PCB Size (mm)38.30 x 62.4824.04 x 30.0027.78 x 39.2240.10 x 67.20
Pins1187129

LCD modules compared in this article (A through E from left)

SPI Signals for LCD Connection

SPI is commonly called a 4-wire serial interface since it uses two data lines for Input/Output in addition to the serial clock and chip select. However, for LCD connections, data transfer is unidirectional (write-only from the device to the LCD module), so typically only one data line is used. In addition to these three wires (serial clock, chip select, and data), the DC and reset signals are used as auxiliary control lines. The signals are summarized as follows.

FunctionDescription
CSSPI Chip Select
SCKSPI Clock
MOSISPI Data (Master Out / Slave In)
DCData/Command
RSTReset

Basically, the CS, SCK, and MOSI signals directly related to SPI should be assigned to dedicated SPI I/O pins, while the DC and RST signals are controlled via GPIO.
Regarding power supply, some LCD modules have an onboard LDO regulator and support 5V input. However, even in that case, the I/O interface voltage remains 3.3V. In addition, many LCD modules have a backlight control pin.

Comparison of Each LCD Module

[A] ST7735 1.8" 128x160

First, here is the 128x160 pixel module using the ST7735 driver. A version with an SPI-connected microSD card slot was available.
ST7735 1.8" 128x160

There is also another version that appears to use the same LCD module but with a full-size SD card slot. The power supply supports 5V input, and when using 3.3V, you need to bridge J1 on the PCB. There is no signal line for backlight LED control.
The connection to Teensy 4.0 is as follows.

ST7735
1.8" 128x160
FunctionTeensy 4.0 Pin
1VCC5V/3.3V
2GNDGND
3GNDGND
4NC
5NC
6NC
7CLKSCK13
8SDAMOSI11
9RSDC8
10RSTRST9
11CSCS10

Since this is a TN panel, I checked the viewing angles. When oriented in portrait mode with the flex cable at the bottom, sweeping the horizontal (left-right) viewing angle while keeping vertical at 0 degrees (head-on) shows little change, with sufficient legibility even at about 45 degrees. When tilting only in the vertical direction while keeping horizontal at 0 degrees: viewing from the 6 o'clock direction, tilting just about 15 degrees noticeably increases overall brightness. Backlight bleed also becomes visible, but since the overall balance is maintained and the image quality appears at its best, this seems to be the intended optimal viewing angle. This remains consistent up to about 45 degrees. On the other hand, viewing from the 12 o'clock direction, tilting just about 15 degrees causes low-brightness areas to become extremely difficult to see. Meanwhile, the backlight bleeds through, severely distorting contrast and color balance, making anything other than high-brightness areas very hard to see.

ST7735 1.8" 128x160 Display Example

[B] ST7735 0.96" 80x160

This is an 80x160 pixel module using the ST7735 driver. Although the flex cable shape differs, it appears to be the same type used on the Sipeed Longan Nano board.
ST7735 0.96" 80x160

The connection to Teensy 4.0 is as follows.

ST7735S
0.96" 80x160
FunctionTeensy 4.0 Pin
1GNDGND
2VCC3.3V
3SCLSCK13
4SDAMOSI11
5RESRST9
6DCDC8
7CSCS10
8BLKBL

Although this module has the lowest resolution among those introduced here, the fine dot size and wide viewing angles characteristic of IPS technology produce a very clean display. The backlight bleed is also well suppressed, giving blacks a beautiful appearance.

ST7735 0.96" 80x160 Display Example

[C] ST7789 1.3" 240x240

This is a 240x240 pixel module using the ST7789 driver.
Source: AliExpressAmazon
ST7789 1.3" 240x240

The connection to Teensy 4.0 is as follows. This LCD module does not have an SPI CS pin, so it cannot share the SPI bus with other SPI slaves, but this means fewer pin assignments are needed. Also, due to the absence of CS, it was necessary to use SPI mode 2 or 3, where SCK goes high when idle. For more details on SPI modes, seehere for detailed information.

ST7789
1.3" 240x240
FunctionTeensy 4.0 Pin
1GNDGND
2VCC3.3V
3SCKSCK13
4SDAMOSI11
5RESRST9
6DCDC8
7BLKBL

Among the LCD modules compared here, this one has the smallest dot size, delivering extremely high-definition image quality. The color reproduction and contrast are also excellent. The 16pt font appears quite small on this display, so when porting from an LCD with similar resolution, adjustments to layout and fonts may be necessary.

ST7789 1.3" 240x240 Display Example

[D] ST7789 2.0" 240x320

This is a 240x320 pixel module using the ST7789 driver. Since a PCB-mounted version was not available, I obtained a flex cable type with 0.8mm pitch.
Source: AliExpress
ST7789 2.0" 240x320

For breaking out the 0.8mm pitch flex cable, I used a QFP package adapter board with 0.8mm pitch to convert to 2.54mm pitch.
QFP adapter board source: AliExpress

Connection with flex cable

The connection to Teensy 4.0 is as follows.

ST7789
2.0" 240x320
FunctionTeensy 4.0 Pin
1GNDGND
2LEDKLEDK
3LEDALEDA
4VCI3.3V
5GNDGND
6GNDGND
7WR/A0DC8
8CSCS10
9RS/SCLSCK13
10SDAMOSI11
11RESETRST9
12GNDGND
This LCD module also offers wide viewing angles characteristic of IPS panels. The display quality is on par with modules [B] and [C]. The dot size is neither too small nor too large, making it practical to use.

ST7789 2.0" 240x320 Display Example

[E] ILI9341 2.2" 240x320

Finally, here is the 240x320 pixel module using the ILI9341 driver.
Source: AliExpressAmazon
ILI9341 2.2" 240x320

The connection to Teensy 4.0 is as follows. The power supply supports 5V input, and when using 3.3V, you need to bridge J1 on the PCB. As for the RESET pin, it needed to be tied to 3.3V permanently for proper operation.

ILI9341
2.2" 240x320
FunctionTeensy 4.0 Pin
1VCC5V/3.3V
2GNDGND
3CSCS10
4RESETRS?3.3V
5DC/RSDC8
6SDI/MOSIMOSI11
7SCKSCK13
8LEDBL
9SDO/MISO

Since this is a TN panel, I checked the viewing angles. Compared to the other TN panel [A] ST7735 1.8" 128x160, the variation is noticeably less. Sweeping the horizontal (left-right) viewing angle shows little change. In the vertical direction, the best balance is achieved at about 15 to 20 degrees tilt toward the 6 o'clock direction. When viewed from the 12 o'clock direction, tilting 15 to 20 degrees does degrade contrast and color reproduction, but not to the point of severely impairing legibility, so this panel performs reasonably well for a TN type.

ILI9341 2.2" 240x320 Display Example

graphicstest Video

I also recorded a video. Due to camera exposure, high-brightness areas may appear to have lower saturation than they actually do; in reality, the colors look a bit better.

graphicstest Project

I used a customized version of the graphicstest project included with Adafruit's LCD library for testing. It was built and used on a Teensy 4.0 board with the Visual Studio Code + PlatformIO extension environment.

For the project for modules [A] through [D] using ST7735 and ST7789 driver ICs, please refer to the following.

For the project for module [E] using the ILI9341 driver IC, please refer to the following.

About Me

My photo
Electronics, programming & audio

Featured Post

Synchronizing Radio-Controlled Clocks with Raspberry Pi Pico W (JJY Standard Radio Wave Emulator)

As a Raspberry Pi Pico W application, I built a JJY emulator for radio-controlled clocks (for time synchronization) with minimal peripheral...

QooQ