Announcement

Collapse
No announcement yet.

uOLED-92-G2 Display Orientation

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

  • uOLED-92-G2 Display Orientation

    Hello all,
    I am attempting to invert my display 180 degrees, but it appears to be impossible.I am using the GOLDELOX-SGC command set on the uOLED-92-G2 display.
    I have seen an option to set the display's orientation in the FAT Controller software. When setting the display to reversed portrait, the FAT controller shows the bytes 0x59, 0x04, and 0x04 being sent to the display. In the SGC datasheet, 0x59 is shown to be display control, and has modes for Display ON/OFF, Contrast Adjust, and Display PowerUp-Shutdown (0x01-0x03). However, there is no mode for changing orientation (0x04) listed on the datasheet, and sending the command through the FAT Controller (or in our firmware for that matter) has no effect on the actual display.

    Does this particular command not exist for this display/command set, or am I overlooking something? If so, is there any other easy way you know of to invert what is displayed on-screen?

    Thanks,Rob

  • #2


    You need to use DISP against the avatilable header file to change _65K_COLOURS in 'Initialization Commands' to 0x70


    The mode change commands are not applicable to Goldelox displays.
    Mark

    Comment


    • #3


      I am trying to do this with both a uOLED-96-G2(SGC) and a uOLED-128-G1(SCG).

      I have successfully installed DISP and have been able to upload and download, change the splash screen, etc.

      However when I upload from either unit, I only see hex values under the Initialization commands, no "_65K_Colours", and no text in any of the fields. I also get no list under the 'Defines" tab.

      Can you advise me on how to proceed?

      Thanks in advance.

      Mark

      Comment


      • #4


        Hmm, I think you are reading the current values from the display, that will give you hex only values and nothing under defines.

        What you need to do is use the 'configuration' file from the downloads tab on the produc page, eg http://www.4dsystems.com.au/prod.php?id=163

        When you open that in DISP you will see the relevant information
        Mark

        Comment


        • #5


          That makes sense. Thank you so much.

          Mark

          Comment


          • #6


            0x70h flipped the display, but gave me a mirror image, so I could not read the text. Is there a different value that rotates the display 180 degrees?

            Mark

            Comment


            • #7


              I figured it out for the uOLED-96-G2(SGC). From the factory, the value is 0x72.

              0x70 actually did not flip the display, it gave me a mirror image. I played with different bit combinations and learned that 0x62 flipped the display vertically and mirror imaged it.

              0x60 is the value that will rotate the display by 180 degrees so you can mount the unit upside down and have it work properly.

              The file I downloaded for the uOLED-128-G1(SCG) doesn't have the "_65K_Colours" in the Defines tab. EDIT: That is because I downloaded the uOLED-128-G1h.h file, rather than the uOLED-128-G1.h file. The non-h version has the required field.

              Comment


              • #8


                NP.

                One last, non-obvious check to do, create an image of a square box with eack side a different color and TBLR near the sides.

                Render it on the display and ensure that everything ends up in the expected locations (Letters are easy to spot wrong, but also pay attention to the lines to make sure some don't end up on top of or adjacent to each other)
                Mark

                Comment


                • #9


                  Will do, and will report back.

                  FYI, the stock value for the uOLED-128-G1 is 0x74, but I found that 0x62, 0x63, 0x66 and 0x67 will rotate the display by 180 degrees.

                  I am only using text, but it does appear that going to 0x62 & 0x63 do screw up the colors a bit.

                  I use pure white, pure blue, pure red, pure green, and a teal-like combination of green and blue. White and green work fine, but it looks like blue and red are swapped and the teal comes out a dull yellow.

                  0x66 & 0x67 works and does give me the correct colors.

                  It does appear that my text does not start at the upper left hand corner of the display in the new orientation. It is about 25% of the screen down. I will have to figure that out, too.

                  What is "TBLR"?

                  Comment


                  • #10


                    Top, Bottom, Left, Right

                    Just so you can quickly see if the image is being flipped in an odd way
                    Mark

                    Comment


                    • #11


                      Graphics shorthand. LOL

                      I have drawn the box with 4 colors, and have learned that, with the display rotated 180*, the software origin is 32 pixels below the physical display origin.

                      How do I fix that?

                      I'll add TBLR in the mean time.

                      I really appreciate your help.

                      FYI, this circuit is destined to replace the stock clock in 1994-1997 Ford Mustangs. It will add coolant temp, intake air temp, oil pressure, fuel pressure and voltage gauge functionality to the clock.

                      Comment


                      • #12


                        TBLR is ok.

                        Comment


                        • #13


                          My bad.

                          I did need the uOLED-128-G1h.h Config file. I set the REMAP_COLOUR_SETTINGS in the Initialization Commands tab to 0x67 and it all started working with the display rotated 180*.

                          What a beautiful display!

                          Sorry for the confusion.

                          Mark

                          Comment


                          • #14


                            So, both are OK now?
                            Mark

                            Comment


                            • #15


                              Both are ok now.

                              I did a little exhaustive documentation of what I found.

                              Here is what I have learned about the 65K_COLOURS settings for the two 4D Systems displays I have: You have independent control of flipping vertically and horizontally. Unless you want a mirror image, if you flip vertically, you must also flip horizontally to maintain a normal display. The definition of bits 4 (Vertical) & 2 (Color) are inverted between the OLED-128-G1h(SGC) and the OLED-96-G2(SGC) OLED-128-G1h(SGC): (Set under the "Initialization Commands" tab in the REMAP_COLOUR_SETTINGS field) 0110 0100 = 0x64 = Connector at bottom, Mirror image0110 0110 = 0x66 = Connector at bottom, Normal display0111 0100 = 0x74 = Connector at top, Normal display (Default)0111 0110 = 0x76 = Connector at top, Mirror image Bit Definitions:---V ---- Controls vertical orientation---- --H- Controls horizontal orientation FYI: ---- -C-- Controls Color, 1=Normal, 0=Blue & Red swapped OLED-96-G2(SGC): (Set under the "Defines" tab in the _65K_COLOURS field) 0110 0000 = 0x60 = Connector at top, Normal display0110 0010 = 0x62 = Connector at top, Mirror image0111 0000 = 0x70 = Connector at bottom, Mirror image0111 0010 = 0x72 = Connector at bottom, Normal Display (Default) Bit Definitions:---V ---- Controls vertical orientation---- --H- Controls horizontal orientation FYI: ---- -C-- Controls Color, 1 = Blue & Red swapped, 0 = Normal HTH Mark

                              Comment

                              Working...
                              X