Announcement

Collapse
No announcement yet.

Pease reply! about memory control ( call image)

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

  • Pease reply! about memory control ( call image)

    I could show first image below cmd.
    putc(0x40);
    putc(0x4F);
    putc(0x00);
    putc(0x00);
    putc(0x00);
    putc(0x01); first image come back "ACK" (Displayed image on screen)
    2nd cmd ---> come bak "ACK" but not changed image .

    9600 bps.
    PIC user.

  • #2


    Koby,
    Your reply is lengthy with examples coming soon. Won't be long now.
    Atilla

    Comment


    • #3


      Koby,
      You are using the "Display Object from Memory" command. An object can be any one of the commands, including the image command. An image object is stored differently. The command for the Image is as follows:
      0x40, 0x49, x, y(2 bytes), width, height(2 bytes), colourMode(0x08 or 0x10), SectorAddress(3 bytes Image location)
      As can be seen from the Image command parameters, the raw RGB image block needs to be residing somewhere else in the memory card at a sector boundary. When you issue the "Display Object from Memory" command:
      putc(0x40); putc(0x4F); putc(0x00); putc(0x00); putc(0x00); putc(0x00);
      you are telling the module to point to memory card address 0x00000000 which is where the Image command is located. Let's make this a little bit more clear using an example. Your memory card should look something like the following:

      Address Command Description
      ----------- ----------- -------------------------------------------
      00000000 0x40 ' Start of Image1 command
      00000001 0x49 '
      00000002 0x00 ' x = 0, top left x position of our image
      00000003 0x00 ' y(msb) = 0, top left y position of our image
      00000004 0x00 ' y(lsb)
      00000005 0x20 ' width = 32 pixels
      00000006 0x00 ' height(msb) = 0
      00000007 0x40 ' height(lsb) = 64 pixels
      00000008 0x10 ' colour mode, 16 bits/pixel image
      00000009 0x00 ' these 3 bytes specify the sector address
      0000000A 0x10 ' of the raw RGB image data at sector =
      0000000B 0x00 ' 0x001000 or location = 0x00200000
      --------------------------------------------------------------------------------
      0000000C 0x40 ' Start of Image2 command
      0000000D 0x49 '
      0000000E 0x00 ' x = 0, top left x position of our image
      0000000F 0x00 ' y(msb) = 0, top left y position of our image
      00000010 0x00 ' y(lsb)
      00000011 0x40 ' width = 64 pixels
      00000012 0x00 ' height(msb) = 0
      00000013 0x40 ' height(lsb) = 64 pixels
      00000014 0x10 ' colour mode, 16 bits/pixel image
      00000015 0x00 ' these 3 bytes specify the sector address
      00000016 0x12 ' of the raw RGB image data at sector =
      00000017 0x00 ' 0x001200 or location = 0x00240000
      ---------------------------------------------------------------------------------
      00000018 0x?? ' Start of next object or nothing
      00000019 0x?? ' part of next object or nothing
      ....
      ....
      ---------------------------------------------------------------------------------
      00200000 0x?? ' Start of Image1 RGB data. RGB(0)
      .... '
      00200FFF 0x?? ' End of Image 1 RGB data. RGB(4095)
      ' Size of data = 32 x 64 x 2 = 4096 bytes
      ---------------------------------------------------------------------------------
      00240000 0x?? ' Start of Image 2 RGB data. RGB(0)
      .... '
      00201FFF 0x?? ' End of Image 2 RGB data. RGB(8191)
      ' Size of data = 64 x 64 x 2 = 8192 bytes
      ---------------------------------------------------------------------------------

      Now your serial command to display image1 as an object will be:
      putc(0x40); putc(0x4F); putc(0x00); putc(0x00); putc(0x00); putc(0x00);
      and to display image2 as an object will be:
      putc(0x40); putc(0x4F); putc(0x00); putc(0x00); putc(0x00); putc(0x0C);

      And to display the Image directly (Display Image/Icon command) rather than as an object, the command is:
      extCmd, cmd, x, y(msb:lsb), width, height(msb:lsb), colourMode, SectorAddress(hi:mid:lo)
      So to display Image1 directly your serial command will be:
      putc(0x40); putc(0x49); putc(0x00); putc(0x00); putc(0x00); putc(0x20); putc(0x00); putc(0x40); putc(0x10); putc(0x00); putc(0x10); putc(0x00);
      and to display Image2 directly your serial command will be:
      putc(0x40); putc(0x49); putc(0x00); putc(0x00); putc(0x00); putc(0x40); putc(0x00); putc(0x40); putc(0x10); putc(0x00); putc(0x12); putc(0x00);
      These are all outlined in the User Manual and I'm hoping I understood your question correctly.
      Atilla

      Comment


      • #4


        Thank you for your support!
        80% solved my problem.

        First image was displayed on successfully.
        but, 2nd image was not displayed correctly position.
        Please see below image.

        -------------
        | | |

        Comment


        • #5


          How are you saving the images, with the Graphics Composer?
          Atilla

          Comment


          • #6


            I use below environment.

            GraphicsComposer.exe V2.0.0.4 23/09/2007
            uLCD-320-PMD2-uSD-Serial_rev2.pmmc
            ( I know newest rev.6 but ,only rev2 is available .
            If I use other rev. no slide show, and My PG no working

            Properties 240*320
            image 240*320 center 0,0,240,320 16Bit
            Delay 1000 msecs
            Image 240*320 center..........
            Delay 1000 ........
            .......

            Please .reply. Thank you.

            Comment


            • #7


              Ok. The Graphics Composer produces a text file with the same name. Can you copy and paste that file here exactly?
              Atilla

              Comment


              • #8

                I understand what you want to say.

                I could display the 2nd image correctly.

                I appreciate your help and support !!!
                Thanks.


                Cmd (19) = 11 << 2nd image address
                Cmd (1A) = 2C <<
                Cmd (1B) = 7 <<
                --------------------------------------------------------------

                File "C:\4Dsys\PICTURE\02576_240x320.jpg"
                Location = 0x200000(2097152)
                Width = 240 Height = 320 Bits = 16
                64, 73, 0, 0, 0, 240, 1, 64, 16, 0, 16, 0
                File "C:\4Dsys\PICTURE\02656_240x320.jpg"
                Location = 0x225800(2250752)
                Width = 240 Height = 320 Bits = 16
                64, 73, 0, 0, 0, 240, 1, 64, 16, 0, 17, 44
                File "C:\4Dsys\PICTURE\0411cal_frame.jpg"
                Location = 0x24B000(2404352)
                Width = 240 Height = 320 Bits = 16
                64, 73, 0, 0, 0, 240, 1, 64, 16, 0, 18, 88
                File "C:\4Dsys\PICTURE\0411cal_fuji.jpg"
                Location = 0x270800(2557952)
                Width = 240 Height = 320 Bits = 16
                64, 73, 0, 0, 0, 240, 1, 64, 16, 0, 19, 132
                File "C:\4Dsys\PICTURE\0411cal_momiji.jpg"
                Location = 0x296000(2711552)
                Width = 240 Height = 320 Bits = 16
                64, 73, 0, 0, 0, 240, 1, 64, 16, 0, 20, 176
                Cmd (0) = 40
                Cmd (1) = 49
                Cmd (2) = 0
                Cmd (3) = 0
                Cmd (4) = 0
                Cmd (5) = F0
                Cmd (6) = 1
                Cmd (7) = 40
                Cmd (8) = 10
                Cmd (9) = 0
                Cmd (A) = 10
                Cmd (B) = 0
                Cmd (C) = 7
                Cmd (D) = 3
                Cmd (E) = E8
                Cmd (F) = 40
                Cmd (10) = 49
                Cmd (11) = 0
                Cmd (12) = 0
                Cmd (13) = 0
                Cmd (14) = F0
                Cmd (15) = 1
                Cmd (16) = 40
                Cmd (17) = 10
                Cmd (18) = 0
                Cmd (19) = 11
                Cmd (1A) = 2C
                Cmd (1B) = 7
                Cmd (1C) = 3
                Cmd (1D) = E8
                .....
                ----------------------------------------

                Comment


                • #9


                  [quote]I appreciate your help and support !!!
                  Thanks.
                  Anytime...

                  Cmd (19) = 11
                  Atilla

                  Comment

                  Working...
                  X