Skip to main content
Visitor II
September 23, 2025
Question

Implementing Grayscale LCD Using TOUCH GFX

  • September 23, 2025
  • 1 reply
  • 387 views

Hello,
I am working on a display using an 8-bit grayscale TFT LCD.
The LCD panel itself is grayscale, but the driver IC is a hybrid designed for RGB.
Because of this, pixels are grouped in sets of three, each driving RGB subpixels. For example, if the LCD resolution is 36×36, it actually needs to be controlled as 12×36.

Currently, I am converting images into hex codes and managing them manually using a hex code editor.

Is there a more convenient way to implement this using TOUCH GFX?
As far as I know, TOUCH GFX does not provide a way to configure it like this.

Thanks in advance.

1 reply

ST Employee
October 2, 2025

Hello @DIpark,

TouchGFX doesnt support 8bit grey scale, but you can convert it by your self when it's sent to the frambuffer or at the endFrame.
Check the functions  :

// called when fb sent to Screen
void TouchGFXGeneratedHAL::setTFTFrameBuffer(uint16_t* adr);
// called at the end when frame is rendered
void TouchGFXGeneratedHAL::endFrame();

As 8 bit is not supported, it's unnecessary to do images format conversion. I'll recommend you to use 16bit format (RGB565) for your framebuffer.

BR,