ST7789 tricks and hacks

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
DanielMGessel
 
Posts: 13
Joined: Fri Dec 01, 2017 1:41 am

ST7789 tricks and hacks

Post by DanielMGessel »

I'm beginning to understand the datasheet for the ST7789 lcd chip used in many Adafruit products. It says there are 320x240x18 bits (1382400) of memory to hold the image to drive the display. Unfortunately, it doesn't have room for a whole second copy to, say, do page flipping. It does support 12 bit color (444) which is interesting - driving a high dpi display, dithering 24 bit (888) to 12 might not look bad. Conveniently 1382400/240/240=24, or just enough room for 2 buffers in 12 bit on the 240x240 displays.

Has anybody tried to figure out if this can be done? Display half the memory, write to the other half, then flip on vsync?

Thanks.

User avatar
blnkjns
 
Posts: 963
Joined: Fri Oct 02, 2020 3:33 am

Re: ST7789 tricks and hacks

Post by blnkjns »

Just make sure the driving board has enough ram for the buffer you want to use. For example 2 pages with 565 encoding (default adafruit buffer). It needs 300kB of RAM. You could modify the buffer drawing routines to allow dithering between frames. A Teensy 4 will be able to handle that. You can't change the buffer on the screen itself.

User avatar
DanielMGessel
 
Posts: 13
Joined: Fri Dec 01, 2017 1:41 am

Re: ST7789 tricks and hacks

Post by DanielMGessel »

If my math is right (doubtful) there’s enough room in the ST7789 to store 2 240x240 frames at 12 bits per pixel. I’m generally a raspberry pi user, so memory and processing power is available off chip.

But I don’t know if the ST7789 is flexible enough to support the page flipping. Or perhaps the lcd itself requires data in a particular format… I’ll get back to the datasheet this week.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”