<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPC Microcontrollers中的主题 Best refresh strategy with external display controller</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Best-refresh-strategy-with-external-display-controller/m-p/515177#M1055</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by giusloq on Sun May 03 10:55:25 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I already post this on emWin forum, but I didn't receive any help after some days. I hope someone can help me here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using a TFT display with integrated ILI9341 controller. The connection between MCU and TFT is 16-bits parallel.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm confused about the best strategy to refresh the display when some parts change.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Suppose I have a black background with one image at the center. Every 1 second, a variable is checked and, depending on its value, the image at the center could change accordingly. The variable is updated in another task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can use the background window and call GUI_DrawBitmap() in WM_PAINT message. Every 1 second, I call WM_Invalidate() to force the refresh (maybe in a WM_TIMER message).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This works, but I suspect the GUI library is forced to redraw (i.e., re-write) every pixel of the display, not only the pixels of the image that could change. This approach wastes a lot of time and precious resources.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So what is a better approach? I'm thinking to create an IMAGE widget in WM_CREATE and change the image with IMAGE_SetBitmap() directly in WM_TIMER (raised every second) and not in WM_PAINT.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, I can't use a data cache to store the actual pixel values, because I don't have memory space. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 17:16:46 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T17:16:46Z</dc:date>
    <item>
      <title>Best refresh strategy with external display controller</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Best-refresh-strategy-with-external-display-controller/m-p/515177#M1055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by giusloq on Sun May 03 10:55:25 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I already post this on emWin forum, but I didn't receive any help after some days. I hope someone can help me here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using a TFT display with integrated ILI9341 controller. The connection between MCU and TFT is 16-bits parallel.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm confused about the best strategy to refresh the display when some parts change.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Suppose I have a black background with one image at the center. Every 1 second, a variable is checked and, depending on its value, the image at the center could change accordingly. The variable is updated in another task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can use the background window and call GUI_DrawBitmap() in WM_PAINT message. Every 1 second, I call WM_Invalidate() to force the refresh (maybe in a WM_TIMER message).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This works, but I suspect the GUI library is forced to redraw (i.e., re-write) every pixel of the display, not only the pixels of the image that could change. This approach wastes a lot of time and precious resources.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So what is a better approach? I'm thinking to create an IMAGE widget in WM_CREATE and change the image with IMAGE_SetBitmap() directly in WM_TIMER (raised every second) and not in WM_PAINT.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, I can't use a data cache to store the actual pixel values, because I don't have memory space. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:16:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Best-refresh-strategy-with-external-display-controller/m-p/515177#M1055</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:16:46Z</dc:date>
    </item>
  </channel>
</rss>

