Announcement

Collapse
No announcement yet.

Landscape bitmaps on uLCD32PT

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

  • Landscape bitmaps on uLCD32PT

    Hi,

    I'm getting corrupted / streaky bitmaps on my uLCD-32032-P1T(SGC) display, and I sort-of know why but don't know how to fix it. I had the same problem with a uOLED-32028P1T(SGC), and resolved it by reading this post.

    http://4d.websitetoolbox.com/post/show_single_post?pid=1268272037&postcount=4

    I thought that if I loaded the "uLCD-32PTSGC-L-R19.PmmC" file and then the "uLCD-32PT-L-V00.h" header it might do the trick. However, the comment shown in the DISP.EXE window states "Orientation set in hardware should remain Portrait". I'm pretty sure that I need the hardware orientation to be landscape... I have reloaded all the default files and got back to where I started. I'm using the display as an OEM serial command module, and would just like to have it as a drop-in replacement for the OLED module. In all other respects this works - the only defect is the startup splash screen displays as a streaky mess. I suspect you've posted the solution to this a few times already, but couldn't find it on my trawl through the forum. I'd be grateful if you could point me in the right direction,

    Ian

  • #2


    On most displays the orientation can be set using the header file.

    The uLCD-32PT is an exception. For this display you use the PmmC preset to the orientation you want to use. The header file is preloaded, but available for you to use to change Fonts, Splashes, etc.

    The 'startup splash screen is a streaky mess'? that would tend to indicate the wrong PmmC, I think.

    In para1 you say uLCD-32032-P1T, in para2 you say uLCD-32PTSGC-L-R19.PmmC. They are two different displays, whoch one are you using?

    You also say "drop-in replacement for the OLED module", the oled module never came in 3.2" are you, maybe, using a 2.8" LCD module?
    Mark

    Comment


    • #3


      Ok, I've obviously confused the issue by mentioning landscape mode and the other displays. If I stay in portrait mode (as factory-shipped), and power the display on the bench, I get your factory splash screen with "uLCD-32PT", which matches the silkscreen on the PCB.

      If I manually rotate a 240x240 bitmap image, create a gci file, load it using the "@m" serial command at xy 0,0 imagepos 0, the display will show it ok.

      If I manually rotate a 320x240 bitmap image to make a 240x320 image, create a gci file, load it using the "@m" serial command at xy 0,0 imagepos 0, I get a corrupt image.

      The attached pdf gives various screen shots of the graphics composer settings and the resulting screen output. The photos of the screen are a bit dark and blurred but hopefully they will be good enough for you to understand my problem. Simplified question: why is the second image not displayed correctly?

      Ian


      Attached files splash_problem.pdf (277.3 KB)

      Comment


      • #4


        Hmm, you say you are in portrait mode, but the images you show are clearly presented in Landscape mode.

        Regardless of how you switched into Landscape mode, either by using the L - Landscape 320x240 PmmC, or by using the 'Display Orientation' command in portrait mode, you will get that 'effect' if you try to display a 240x320 image.

        For the 'Display Orientation' command the manual clearly states "Note: The orientation command is effective for all graphics and text functions except for images and video."

        If you load uLCD-32PTSGC-R19.PMMC and display your 240x320 image it will work fine.

        If you load uLCD-32PTSGC-L-R19.PmmC and display a 320x240 image it will work fine.
        Mark

        Comment


        • #5


          The images here are all portrait format and I tried really hard to show that by attaching screens from the graphics composer to show that I had rotated the bitmaps by 90 degrees to give the appearance of landscape on a portrait display placed on its side.

          This is a bug or highly misleading documentation (or both). I have now got to the bottom of the problem - your statement "If you load uLCD-32PTSGC-L-R19.PmmC and display a 320x240 image it will work fine." is incorrect. It *will* display a 240x240 image just fine with either 'Display Orientation'. The 240x320 portrait image only displays correctly if 'Display Orientation' = Portrait. Screens attached, hopefully this will save someone else from the hours it has taken me to get this far. I now understand my earlier issues with the OLED display, and have a way of avoiding the production step of having to reprogram the flash into landscape mode to display my splash screen. Progress.

          Ian


          Attached files splash_bug.pdf (107.5 KB)

          Comment


          • #6


            Please, there is no bug there.

            I think you may be missreading the manual and using the 'Display orientation' command unnecessarily.

            The natural orientation set in the PmmC does not need 'augmentation' with the 'Display orientation' command. This command overrides the natural orientation, i.e. 'Landcape' rotates the display right by 90degrees, Landscape_R by 270degrees, and Portrait_R by 180 degrees.

            Most people seem to have understood that, at least I haven't seen that misunderstanding before.

            Can you confirm that is what has confused you so I can try to clarify it in the manual?
            Mark

            Comment


            • #7


              I am trying to achieve a portrait module with a portrait image and landscape text.

              To do this I have used uLCD-32PTSGC-R19.PMMC, and a 240x320 portrait image (see attached portrait_image.pdf), with the hex command 59, 04, 01 to change the text to landscape.

              According to your documentation and previous comment: For the 'Display Orientation' command the manual clearly states "Note: The orientation command is effective for all graphics and text functions except for images
              and video." so the image should be unaffected. However, it appears as in the attached image "landscape_orientation.pdf". This is the part of your documentation that has confused me.

              Any explanation/help/suggested solution appreciated.

              Ian

              PS. if you put a 240x320 image file called "sdac.gci" on a disk and send the following in a terminal editor you will see the behaviour discussed in this thread.

              Case 1: Displays correctly
              0x55
              0x40 0x6d 0x53 0x44 0x41 0x43 0x2E 0x47 0x43 0x49 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

              Case 2: Doesn't display correctly:
              0x55
              0x59 0x04 0x01
              0x40 0x6d 0x53 0x44 0x41 0x43 0x2E 0x47 0x43 0x49 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
              Attached files landscape_orientation.pdf (16.5 KB) portrait_image.pdf (185.6 KB)

              Comment


              • #8


                The word 'Effective' is used as follows:- adequate to accomplish a purpose; producing the intended or expected result.

                Using this meaning (the most common one, from my research) of the word and reorganising the sentence it becomes

                "Note: The orientation command is works for all graphics and text functions but does not produce the expected result for
                images and video."

                If you want to use Landscape mode (for the 32PT) you should use the Landscape PmmC, and then you can create and load images in Landscape mode.

                If you try to use Portrait mode and the 'Display orientation' command, this will work as stated above, you must turn it off immediately prior to issuing any image or video commands.
                Mark

                Comment

                Working...
                X