cancel
Showing results for 
Search instead for 
Did you mean: 

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

JLi.21
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

5 REPLIES 5
Imen.D
ST Employee

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

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

Thanks! You answer is really helpful!​

Also, thank you for your warmly welcome.

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