No announcement yet.

How to set display bright with 4DGL?

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to set display bright with 4DGL?

    In the serial commands documentation of the µOLED-96 there you can find the following command to set the

    2.2.22 OLED DisplaY Control Functions (Y)
    to set Contrast,Power up, Power Down

    2.3.2 Dim Screen Area ($D)
    to dim a selected area.

    Are such functions also available for the µOLED320xx with 4DGL? If yes what are the equivalent commands?

  • #2

    The brightness of the display can be set with the display_SetReg("register", "data"); function call, which allows access to the internal registers of the display driver IC. The data sheet will be available in the download section shortly.


    • #3

      Hello Dave,
      I have downloaded the driver IC (S6E63D6X) manual and explored it. But I could not find "direct" registers to adjust OLED brightness/contrast.
      I guess some voltage controls might be the ones but illegal settings may damage the OLED device, so I want to know verified settings.
      Could you please show me some examples of SetReg(register, data)?

      Thanks in advance.


      • #4


        Use the settings for contrast/gamma/brightness in the attached files for now. In the next release we'll have these as built in functions.
        Note: gamma settings are different for the 2.4" and the 2.8" modules.
        Attached files Brightness24.4dg (5.7 KB) Brightness28.4dg (5.7 KB)


        • #5

          Hello Atiilla,

          I have just confirmed it works fine.
          I have made similar function by multiplying fixed point value to each R/G/B field in the color code. But I could not control 3D-Button's edge color.

          I really thank you. I look forward to next release!


          • #6

            Thanks Atilla!

            This was very helpful for me also.


            • #7

              Can I use this via serial mode too?
              Can I use the "write to register" command ($W) for this?
              What is the correct syntax? Ther is no information about the UOLED32028s $W command in the manual. The $W command of UOLED160 can only send bytes but UOLED32028 needs words.
              Can someone explain the values for the registers. I need values below the darkest example in the Brightness28.4dg for a night mode.


              • #8

                No answer?
                Is the write register command still supported by the actual serial PmmC?


                • #9

                  Hi Atilla,

                  Thanks for posting a gamma adjust code.

                  In looking at the code, I see you use registers 43 and 80, neither of which I see in the data sheet. Is there a more up-to-date data sheet around?

                  The data sheet I'm looking at is the S6E63D6, Rev 1.10, which states that register 80 was deleted......

                  The registers 0x70h through ox78h look fine and make sense.....

                  Best Regards,


                  • #10

                    I found the new function

                    gfx_Set(CONTRAST, value);

                    Does this function the same as in the example britghness24.4dg above?


                    • #11

                      *I* think the contrast setting is different from the gamma adjust.

                      I've created a much darker gamma setting (whilst still maintaining colour balance);

                      dispcon_GammaOptSet(9, 0x0702, 0x0702, 0x0F02,
                      0x0000, 0x171F,
                      0x0000, 0x101F,
                      0x0F00, 0x101F);

                      You'll have to pull out the various values from my function structure (9 is the gamma set, R5R0, G5G0, G5G0 (top / bottom voltage settings) then you've got R1R2, R3R4, G1G2, G3G4, B1B2 B3B4)

                      I use this as a screen saver setting. (I also use hardware scrolling at the same time just to make sure I'm not burning the screen.)