0
\$\begingroup\$

I'm developing a project where, using a ESP32 with the esp-idf framework. I need to control, among other things, an LCD display with an SSD1963 controller, and I can only spare 8 GPIO pins for its parallel bus.

With that established, using an 8-bit bus the controller will take RGB888 data (page 17 of the datasheet).

The problem is: the LVGL library, which I'm pretty set on using, is currently unable to provide a pixel buffer in RGB888, which makes sense as 24-bit data isn't ideal for memory alignment on a 32-bit system. It can provide the buffer in ARGB8888 or RGB565, though.

The most immediate solution would be to "translate" the buffer to the desired encoding, but that would take a lot of CPU cycles and memory, both of which I'm not sure I have to spare. If I'm doing that there is no point in using esp_lcd. (maybe I'm wrong and this IS a reasonable solution?)

Is it possible for me to reconfigure the esp_lcd module's DMA to either skip the Alpha byte of ARGB8888 or "decode" RGB565? Maybe there is a better solution I'm not thinking of?

\$\endgroup\$
5
  • \$\begingroup\$ It wouldn't be too complicated to do the conversion to RGB565 in hardware with a couple fast enough logic chips. Not sure how fast would be fast enough in this case, though, as I'm unfamiliar with this sort of application. \$\endgroup\$
    – Hearth
    Commented Nov 20, 2022 at 17:41
  • \$\begingroup\$ I have considered that, but it would complicate the bus timing control signals. It's still an option but I'd rather look for a software solution for now. \$\endgroup\$
    – rubemnobre
    Commented Nov 20, 2022 at 17:48
  • \$\begingroup\$ It seems possible to use this part in a mode similar to SPI - would that be an option? \$\endgroup\$
    – Lundin
    Commented Nov 22, 2022 at 13:33
  • \$\begingroup\$ "24 bit data isn't ideal for memory alignment on a 32 bit system" Well, no... but it can be saved in a way with zero padding, if you write a getter/setter function to obtain it. Use whatever format that's suitable for the controller/display, not whatever is suitable for some lib or MCU. \$\endgroup\$
    – Lundin
    Commented Nov 22, 2022 at 13:36
  • \$\begingroup\$ @Lundin, SPI would be ideal, but the SSD1963 controller only takes a parallel bus. The data transactions are being done with a peripheral that uses Direct Memory Access to DIRECTLY read the buffer and control the bus. "Translating" the buffer like you mentioned would be against the point of using such a peripheral, waste memory (which is on a premium) and reduce performance. My question was more related to how I could change the settings on this peripheral's DMA configuration to either decode 16 bit color or ignore one of the bytes in a 32 bit color such as ARGB8888, like you mentioned. \$\endgroup\$
    – rubemnobre
    Commented Nov 22, 2022 at 15:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.