Using MEM Device on slow CPU

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Using MEM Device on slow CPU

      Hello,
      I'm new to emwin. I read the user manual carefully and were able to get emwin to work with LPC2478 which is a legacy device maximum frequency is 72Mhz.
      What I wanted to do is creating a sliding window with some icons on it. When someone swap on lcd, it should go to the hidden part of the window. The transistion should be smooth as in mobile phones. I was able to do that using emWin but the transition is not smooth. I think that is due to the LOW operating frequency. I think cpu cannot render the image before LCD update rate. When I increase the lcd frequency, display shows some garbage data when I touch the screen. When no touch on screen the screen shows what it has to show without any issue. ( I have coded to invalidate window when the screen is touched ).I have enabled multi buffering. So I decrease the lcd frequency. Now it does not show garbage values but the animation is not smooth. It would be great if some expert can explain the real issue.
      My other question is will there be any plus point if I use memory devices with such low operating frequency cpu ?. because I cannot render the image before lcd refresh.
    • Hi,

      I guess what you are experiencing is simply related by the low frequency of your device.

      But it depends a lot on the images you are displaying. These are some points which have an influence on the performance:

      Size - Of course large images take longer to be displayed
      Color format - Choose one which fits to your LCD setting. For example, when displaying a 32bit image with 16 color conversion each pixel has to be converted into the proper format.
      Semi transparency - If the image contains semi transparency it requires a lot more calculation than for opaque pixels.

      It might come in handy to use memory devices, e.g. you have stored the image in a less memory consuming format (maybe 16bpp) but your device uses 32bpp. Then it makes sense to create a 32bpp memory device and draw the 16bpp into it. Later on only draw the memory device (of course this device must not be deleted). This way the conversion from 16bpp to 32bpp is done only once. Of course this will work the other way around too.

      Which color conversion are you using in your LCDConf.c?
      Which format do the images have?

      Regards,
      Sven