FTDI Community

General Category => Discussion - Software => Topic started by: techtoys on March 16, 2019, 03:09:13 PM

Title: Partial screen update with FT813
Post by: techtoys on March 16, 2019, 03:09:13 PM
Hi

Is there any method to do a partial update to LCD screen driven by FT813?
Testing with Msvc_Emulator with a very simple feature. Code snippet is shown below:

Code: [Select]
//Display list to draw something at the top
Gpu_CoCmd_Dlstart(phost);
FuncA_display_object(); //function to display something on top of the screen
App_WrCoCmd_Buffer(phost, END());
App_WrCoCmd_Buffer(phost, DISPLAY());
Gpu_CoCmd_Swap(phost);
App_Flush_Co_Buffer(phost);
Gpu_Hal_WaitCmdfifo_empty(phost);

//2nd display list to draw some other contents a the bottom.
Gpu_CoCmd_Dlstart(phost);
App_WrCoCmd_Buffer(phost, SCISSOR_XY((DispWidth / 2) - 14, (DispHeight - 75)));
App_WrCoCmd_Buffer(phost, SCISSOR_SIZE(32, 32));
App_WrCoCmd_Buffer(phost, CLEAR_COLOR_RGB(255,255, 1));
App_WrCoCmd_Buffer(phost, CLEAR(1, 1, 1));
FuncB_display_object(); //function to display other contents at the bottom of the screen
App_WrCoCmd_Buffer(phost, END());
App_WrCoCmd_Buffer(phost, DISPLAY());
Gpu_CoCmd_Swap(phost);
App_Flush_Co_Buffer(phost);
Gpu_Hal_WaitCmdfifo_empty(phost);

The mindset to run FuncA_display_object() and FuncB_display_object() within a single display list with one swap is not allowed for my case. With code above I can see only the bottom content because the second display list is refreshing the whole screen. I did try to use scissor but this macro only restrict the area to draw in the second display list, the rest of the area including the top part has been erased completely.

Is it something related to SAVE_CONTEXT() & RESTORE_CONTEXT()? and Can somebody help in this ?

Thanks in advance.

John

Title: Re: Partial screen update with FT813
Post by: FTDI Community on March 18, 2019, 01:31:27 PM
Hello,

Please have a look at the following Application Note:
https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/AN_340_FT800_Optimising-screen-updates-with-Macro-and-Append.pdf (https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/AN_340_FT800_Optimising-screen-updates-with-Macro-and-Append.pdf)

The methods described in this should be helpful for you.

Best Regards,
FTDI Community