Questions? Call us: +1 760-918-6722

Issue with 6-bit RGB

The ILI9341 data sheet says that the maximum DOTCLK frequency is 10 MHz (min period 100ns). In that case, the display cannot run at 60 Hz in 6-bit RGB mode because DOTCLK would exceed 10 MHz:

240 pixels * 320 pixels * 3 cycles/pixel * 60 Hz = 13.824 MHz

(That ignores VSYNC and HSYNC for simplicity.)

6-bit RGB cannot go over ~43 Hz without violating the 10 MHz spec.

240 pixels * 320 pixels * 3 cycles/pixel * 43 Hz = 9.9 MHz

Is the 43 Hz limit accurate? I do not understand how to set the RTNA register value in that case, since the ILI9341 data sheet options only show 61 Hz and greater. Please clarify:

  1. What frame rates are supported in 6-bit RGB mode?
  2. How should RTNA be configured for 6-bit RGB mode?

I currently have graphics on the screen in 6-bit RGB mode, but I am seeing the screen rapidly modulate brightness. The modulation looks worse as the frame rate is decreased, and that makes it seem like low frame rates (e.g. 30 Hz) are not supported in 6-bit RGB mode.


engineering_seacomp's picture
April 12, 2018

The RTNA register sets the ILI9341 output frame rate to the display pixels in MCU mode. It has no effect in RGB mode where the frame rate is determined at the video source (pixel clock, VSYNC and HSYNC). In RGB mode, the ILI9341 just passes through whatever video data is coming in and serves mostly to just drive the display pixels. There are big advantages to using MCU, if at all possible, since the display looks more like a memory device and you can update the screen image at any rate within the ILI9341 bus specifications without affecting the display refresh rate. In MCU mode, the ILI9341 handles refreshing the screen. Be aware that the pixels in the display have a typical response time of about 20ms, so refresh rates above 50Hz have a diminishing effect on the image quality.

The brightness modulation issue you are seeing may not be directly related to the frame rate as we often drive our displays in RGB mode at 30Hz without seeing that kind of effect. One thing to check is the power supply register settings in the ILI9341. Look at Power Control 1 (C0h), Power Control 2 (C1h), VCOM Control 1(C5h) and VCOM Control 2(C7h) to see if they are set to the values called out in the Displaytech sample initialization code. If those aren't set correctly, the incoming video data can cause the ILI9341 pixel driver power supply voltages to be unstable.

skrasms's picture
April 15, 2018

Thank you for responding.

RTNA was confusing because the ILI9341 data sheet shows “RTN = 5’h1” in the 70 Hz RGB configuration example (section 7.2.1).

I am currently following these VCOM and Power Control settings that were provided by Displaytech:

    WriteCommand(POWER_1); //power control


    WriteCommand(POWER_2); //power control


    WriteCommand(VCOM_1); //vcom control



    WriteCommand(VCOM_2); //vcom control


Running at a frame rate of 37 Hz, the brightness modulation is noticeable with those power settings.

I have noticed empirically that the modulation gets better as I make the value of PCDIV lower. PCDIV = 0x00 is the best setting visually but does not completely fix the issue. That also does not match this description in the ILI9341 datasheet:

“PCDIV specifying DOTCLK’s division ratio, are determined so that difference between PCLKD’s frequency and internal oscillation clock 615KHz is the smallest.”

I am running DOTCLK at nearly 10 MHz. PCDIV=0 would then be:

10M / 2 = 5 MHz

That is a long way from 615kHz.

If I try to reach 615kHz by using PCDIV=0x07 (~625kHz), the screen looks terrible. Everything becomes washed out towards the color white, and the brightness modulation effect is still there.

As an extreme test, I ran the display at a frame rate of 1 Hz while looking at it under a microscope. I see that, for shades of gray in a static image, the display is alternating the gray pixels between two brightness levels. It switches between the two levels once per frame. I believe that is the brightness modulation issue that I am seeing.

That all leads to two questions:

  1. Is PCDIV supposed to be 0 in 6-bit RGB mode?
  2. Is there a way to disable the “gray dithering” that changes the brightness of gray pixels from frame to frame?







engineering_seacomp's picture
April 17, 2018

I would suggest commenting out all the POWER and VCOM registers.  See if the display has the same problem after doing this step.


Below is some sample code for the DT024CTFT, and you will notice the POWER and VCOM use the default.


void GfxTconInit(void) {

    //Hardware reset

    //Software Reset


    //Interface control

    //Pixel format

    // Memory Access Control
    GfxTconWriteParameter(0x48); // Row-Col Exch, BGR color direction

    // Sleep Out

    //Display On


    //Backlight On