Announcement

Collapse
No announcement yet.

display picture

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • display picture

    Hello everybody
    I'm trying to display a picture from my host controler which is a pic18F448 on my LCD 43P GFX But I don't suceed.I tryed to use graphic composer but there are some errors .
    I added a new entrie and changed screen size . Then I saved and build on 4DGL uSD-RAW.
    I selected my drive which is a 2GB card formated in FAT16 and NTFS and I put a sector offset off 0 when I clicked ok there was an error window that say "error2Param├Ętre incorrect" and no files on my card
    Even if there was this error I tryed to send instructions from my pic
    FFCD // to clear screen
    FF89 // MEDIA init
    FF92 0000 0000 // set sector adress
    FF8B 0000 0000// media image
    But no result on the screen for the picture but I can clear screen and may be init the media .So my communication is good.I reckon It may have a problem in my step to put and control my picture on my sd card
    Thanks to help me

  • #2


    You haven't shown any of the return codes, but I suspect they are all ok.

    From the message you are getting it would appear that the write to the uSD card is failing, if that fails then you are unlikely to get anything showing on the screen.

    How big is the image you are writing to uSD in GC?

    (There is a known issue that can cause this 'Error2' message when writing RAW images to uSD, but the file being written would have to be much much larger than a 272x480 image)

    Why have you chosen to use RAW images?
    Mark

    Comment


    • #3


      thanks for your reply
      The image source is 20 ko 323 x274 .My screen size is 480 x 272 I have just saw that the image is .gif and I don't know if I can use this image
      about position
      width 480 height 272
      I uncheck ignore screen size contraints
      to be honest I don't know why I have chosen a Raw image . I tryed with fat image but there were no results .With fat image I do the same steps but I built on my computer and then I copy all the generated files on my SD card . I did the same instruction with a sector offset of 0 but nothing

      Comment


      • #4


        I don't understand "20 ko", if you mean you have 20 images of that size in GC then that may be causing the issue. A new workshop will be available in the next couple of days that fixes that.

        Meanwhile, when you use a FAT16 formatted uSD (You said "FAT16 and NTFS" which are mutually exclusive), you should be using file_mount, file_loadImageControl, and img_Show for the image to display. Try it first with Serial Commander and if it doesn't work post your logs here.
        Mark

        Comment


        • #5


          So I Tryed

          I open graphic composer
          I add my image
          I change my screen size
          i maximize the image
          i uncheck ignior screen size
          I save my gcs on my desk
          I built all on my desk
          There were 6 files .gc .gci.txt.dat .gcs and an
          other one
          I copy all of them on my SD card and then I mounted it in my screen

          I updated spe load
          I open serial commander
          I do file_mount, file_loadImageControl, and img_Show
          and nothing on my screen

          this is the rapport and my picture

          Attached files

          Comment


          • #6


            Should be more like this:-
            file_Mount[FF03 ] 0.125 (ACK 5506 0x1582)
            file_LoadImageControl[0009 "gfx2demo.dat" gfx2demo.gci 0001] 0.269 (ACK 4531 0x11B3)
            img_Show[FF47 11B3 0000] 0.014 (ACK 18 0x0012)
            So for line 2 you need the .dat and .gci extensions and mode should be 1 for now

            For line 3 you need to supply the handle (0x11B3) returned from the file_LoadImageControl as the first parameter to img_Show.
            Mark

            Comment


            • #7


              It's ok
              Thank you so so much
              Now I understand

              just an other question
              How can I do to send the instruction file_LoadImageControl[0009 "gfx2demo.dat" gfx2demo.gci 0001] 0.269 (ACK 4531 0x11B3) from my host controler to my LCD screen because it's easy to sent hex char in the other instruction but in this case it's so hard to send "gfx2demo.dat"?

              Comment

              Working...
              X