diff --git a/drivers/st7789/st7789.cpp b/drivers/st7789/st7789.cpp index 9f033adc5..1b13ac04d 100644 --- a/drivers/st7789/st7789.cpp +++ b/drivers/st7789/st7789.cpp @@ -23,6 +23,7 @@ namespace pimoroni { TEON = 0x35, MADCTL = 0x36, COLMOD = 0x3A, + RAMCTRL = 0xB0, GCTRL = 0xB7, VCOMS = 0xBB, LCMCTRL = 0xC0, @@ -79,6 +80,12 @@ namespace pimoroni { command(reg::PWCTRL1, 2, "\xa4\xa1"); command(reg::FRCTRL2, 1, "\x0f"); + // As noted in https://github.com/pimoroni/pimoroni-pico/issues/1040 + // this is required to avoid a weird light grey banding issue with low brightness green. + // The banding is not visible without tweaking gamma settings (GMCTRP1 & GMCTRN1) but + // it makes sense to fix it anyway. + command(reg::RAMCTRL, 2, "\x00\xc0"); + if(width == 240 && height == 240) { command(reg::GCTRL, 1, "\x14"); command(reg::VCOMS, 1, "\x37");