This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Text Flicker with ILI9341 GFX Library

I'm working with Fantel's adaptation of the nrf52840 (EV-BT840F). I have gotten the GFX example working with Adafruit's ILI9341 in SPI mode, however I am having a problem with text flickering.

When I display text I have to erase that text to show the next string. Currently I am re-writing only the pixels containing text to the background color and then writing the new text on the cleared section. The text is still flickering significantly though.

Looking at Arduino and Adafruit forums I notice that the Adafruit library has a function where you can set the foreground and background colors for text which helps with this flickering problem. I haven't seen anything like that in Nordic's GFX library. Has anyone incorporated that or found a fix for this text flickering?

Parents
  • Hello, 

    I'm not able to see the video you have attached. And unfortunately, I do not have any displays available for testing at the moment.

    What version of the SDK are you using? Have you tried to change the delay time in the while loop? Have you verified the connections are correct?

    Kind regards,
    Øyvind

  • Hi Oyvind,

    I am using SDK "nRF5_SDK_16.0.0_98a08e2" there is no delay in the while loop, so it is running at max speed at the moment. I am simply using the GFX example provided in the SDK, the only modifications I have made are the pinout for the Fanstel development board.

    The screen is displaying text, images, and everything fine so I believe the connections are correct. The problem is the update rate of the screen is very low. When I want to write new text to the screen I have to "erase" the old text by writing over it with a rectangle, then the new text slowly writes on the screen. When I want to update a number, like a readout from the ADC, the number appears to flicker because it is erased and then re-written slowly. I have re-uploaded the video below as an mp4, hopefully it will show this time.

    Here is my main loop:

    int main(void)
    {
        APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
        NRF_LOG_DEFAULT_BACKENDS_INIT();
    
        NRF_LOG_INFO("GFX usage example application started.")
        NRF_LOG_FLUSH();
    
        gfx_initialization();
        screen_clear();
    
        while (1)
        {
           nrf_gfx_rotation_set(p_lcd, NRF_LCD_ROTATE_90);
    
           nrf_gfx_point_t text_start = NRF_GFX_POINT(20, 100);
           nrf_gfx_print(p_lcd, &text_start, GRAY, "Hello World!", p_font, false);
           nrf_gfx_screen_fill_area(p_lcd,20,104,235,31,0);
           nrf_gfx_print(p_lcd, &text_start, GRAY, "Test Text", p_font, false);
           nrf_gfx_screen_fill_area(p_lcd,20,104,235,31,0);
    
    //       brackground_set();
    //       text_print();
    //       nrf_delay_ms(1000);
    //       screen_clear();
    //       line_draw();
    //       nrf_delay_ms(1000);
    //       screen_clear();
    //       circle_draw();
    //       nrf_delay_ms(1000);
    //       screen_clear();
    //       test_rect_draw();
    //       nrf_delay_ms(1000);
        }
    }

  • Hello, 

    My apologies for the late reply. I have been waiting for a display, which I received today. Will get back to you within tomorrow or Friday. 

    Kind regards,
    Øyvind

Reply Children
No Data
Related