Home Elements Boards Recipes

Color Displays based on ST7789

The DisplayST7789Element enables using ST7789 based TFT color displays.

st7789 display

The support of colorful LCD / TFT displays like the ST7789 based displays.

The chip supports TFT displays with a maximal display resolution of 240*320 pixels in 262k colors.

Some available displays only use a portion of the maximum display size an are not using the full 18 bits of colour.

The implementation is done with the help of the GFX library for Arduino and supports 16 bit color values per pixel. Colors are coded using a 565 bit color scheme.

Displaying pictures with rich color depth is somehow limited by this design decision.

Configuration

The Display ST7789 Element supports all parameters to configure all displays. The DisplayConfig structure is used to bundle these and pass them to the dedicated Dispay Adapter. While adopting color displays the set of parameters was extended to support the background color andthe SPI interface. A system wide SPI configuration was also added to the Device Element.

By default and during system startup a white draw/text color is used.

Reset pin

Some displays support a hardware based reset signal that can be controlled by a distinct GPIO output signal. The resetpin can be configured and will be used by the display adapter or driver to initialize the display.

Dimming the display

TFT displays need a background lightning.

The control of the background light is not available in the st7789 display driver chip.

Some displays support to control the background light by using a distinct GPIO output signal.

The light pin can be configured and will be used by the display adapter or driver to control the brightness of the display.

Rotating the Display

Displays are often part of boards and are used in various rotations.

The rotation can be configured using the values 0, 90, 180 and 270 and will be used to initialize the display adapter or driver.

See also

Tags

Element Display