Skip to main content
JLi.21
Associate
December 15, 2021
Solved

how to use a RGB 222 Screen( 6-bit, 64 color) screen with stm32

  • December 15, 2021
  • 5 replies
  • 2562 views

I want to drive an RGB 222 screen using LTDC, however the only stm32 chip I found that support LTDC RGB222 mode is stm32l4p/stm32l4q series. I can not find the RGB 222 option in other chips(only RGB 888, RGB 565, ETC). Is stm32l4 the only series that support LTDC RGB 222 mode? Can I use the RGB888 mode to drive a RGB 222 screen? Is there any method to convert?

This topic has been closed for replies.
Best answer by Imen.D

Hello @JLi.21​ and welcome to the Community :)

All devices that contain LTDC feature, support RGB222 mode.

The LTDC always outputs RGB888 formats, then each format is available as long as the corresponding AFs availability: i.e.  RGB222 mode is available as soon the package included the alternate R7, G7, B7, R6, G6 and B6.

Also, the RGB565 mode is available as soon the package included the alternate R[7:3] G[7:2] B[7:3].

For RGB666 the AFs should be available are R[7:2] G[7:2] B[7:2].

I advise you to use STM32CubeMX tool to configure the LTDC peripheral and use RGB222 mode.

Have a look at this AN4861 Application note LCD-TFT display controller (LTDC) on STM32 MCUs, which describes the LCD-TFT display controller of the STM32 MCUs and demonstrates how to use and configure the LTDC peripheral.

Hope my answer helped you!

When your question is answered, please close this topic by choosing Select as Best.

Imen

5 replies

Imen.DBest answer
ST Technical Moderator
December 15, 2021

Hello @JLi.21​ and welcome to the Community :)

All devices that contain LTDC feature, support RGB222 mode.

The LTDC always outputs RGB888 formats, then each format is available as long as the corresponding AFs availability: i.e.  RGB222 mode is available as soon the package included the alternate R7, G7, B7, R6, G6 and B6.

Also, the RGB565 mode is available as soon the package included the alternate R[7:3] G[7:2] B[7:3].

For RGB666 the AFs should be available are R[7:2] G[7:2] B[7:2].

I advise you to use STM32CubeMX tool to configure the LTDC peripheral and use RGB222 mode.

Have a look at this AN4861 Application note LCD-TFT display controller (LTDC) on STM32 MCUs, which describes the LCD-TFT display controller of the STM32 MCUs and demonstrates how to use and configure the LTDC peripheral.

Hope my answer helped you!

When your question is answered, please close this topic by choosing Select as Best.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
JLi.21
JLi.21Author
Associate
December 16, 2021

Thanks! You answer is really helpful!​

waclawek.jan
Super User
December 15, 2021

To spare memory, internally you can use the L8 format and construct the lookup table (palette) so that in LTDC L8 is effectively converted from 1-byte RGB222 (with 2 bits unused) to RGB888 for displaying.

JW

JLi.21
JLi.21Author
Associate
December 16, 2021

Thank you for your answer. I will also try to drive it with L8 mode.