Reading from SD card

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

    • Reading from SD card

      Hi,

      I am trying to display images from SD card using SPI. I saw several example code but none of them seem to work. I have included emFile and emWin paths under build settings.

      Also, when I was trying to use sample codes that are available on this forum, some declaration were not possible such as DWORD, HANDLE. Am I missing to include some header files? I have been using FS.h.
      If someone who has worked on it can share their sample code to display images without OS and using emfile that would be very helpful.

      Please advise.

      Thanks and regards,
      BMD
    • Hi,

      DWORD and HANDLE are types from the Win32-API, therefore these samples aren't to be used for any targets but rather on a Windows PC.

      I've attached a few samples that displays external images (BMP, GIF, JPEG, PNG and bitmap stream) from both the Windows simulation and on the target using emFile. I hope this helps.

      Best regards,

      Florian
      Files
    • Florian,

      I am trying to implement the examples you gave me, images seem to overlap. Is there a way to set things somewhere that helps display picture without overlap.
      Please see attached overlap image and the image that shows how it is supposed to look like.

      I look forward to hearing your thoughts on this.

      Best regards,
      BMD
      Images
      • overlap.jpg

        698.71 kB, 2,831×2,257, viewed 50 times
      Files
    • Hi,

      I've tried to display your image with the sample, but nothing showed up on the screen. It worked fine with another BMP image though, so I guess something's wrong with your image file?

      You could convert it to another file type and still display it from external memory, which worked for me.

      Best regards,

      Florian
    • Florian,

      I converted images to bitmap using bitmap converter. Is there a requirement for the file size/IS there a certain way to do it? I am using M565 so I open files through bitmap converter and convert it to 16 bit color 565 and save as *.bmp. I followed same steps for converting all the images.

      I converted two images and be able to display the image that is 8kB but can't display the image with 80kB. Is this something regarding how memory is set up? Should I make any changes in the configuration?

      Best regards,
      BMD