Communication with internal logic pins 'IS', 'RE', SD'- Display NHD 0420CW- AWE

Comments

10 comments

  • Ted M.
    NHD Staff

    Hi Ed79,
    I found some well commented example code on GitHub for the US2066 controller that may be useful for your reference.

    https://github.com/Andy4495/NewhavenOLED/blob/main/src/NewhavenOLED.cpp

    Regards,

    0
  • Ed79
    Hi Ted,
    Thanks for the code.

    Is there a way I could set those bits in VHDL without the function sets. I am setting output pins with instruction code for fundamental commands. How would I communicated with ‘RE’?
    « Last Edit: August 12, 2020, 10:35:12 AM by Ed79 »
    0
  • Ted M.
    NHD Staff

    Hi Ed,

    There are three sets of command set in US2066: Fundamental Command SetExtended Command Set and OLED Command Set.
    These three command sets can be selected by setting logic bits IS, RE and SD accordingly.
     
    In order to control the "RE" bit, it is necessary to use the Fundamental Command Set of the US2066 controller (listed on pages 26-28 in Table 6-1).

    Use the "Function Set" Command to set bit " D1" to control the state of "RE" and set bit "D0" to change the state of "IS".

    (See RE_Image)

    To set the “SD” flag, you would first need to enter the "Extended Command Set" by setting the “RE” bit high, then using the "OLED Characterization" Command to set the “SD” bit high. (Page 29, Table 6-2)

    US2066 Datasheet: https://support.newhavendisplay.com/hc/en-us/articles/4414485495703--US2066 

    0
  • Ed79

    Ok great. Thank you for the clarification, Ted.

    0
  • Ed79

    Ted,
    I have one more clarification if you could help clear this up as well. When initiating the "Extended Command Sets", where there seems to be two rows of commands, how is this achieved? For example, for function selection A, there is a row with D/C=0 and then another with D/C=1 with A7=A0 in the data bits. I just want to make sure I am understanding this correctly. Thank you again for all your help.

    0
  • Ted M.
    NHD Staff

    Hi Ed79,
    The commands that include 2 lines where the first line shows D/C# as a 0, and the second line shows D/C# as a 1, are functions that require sending Data after the Command is executed.

    In your example:

    After the "Function Selection A" Hex Command "71h" is executed, the following Hex Data "00h" will Disable the Internal 5v Regulator.
    Instead, if the Hex Data sent is "5Ch", then this will Enable the 5v Regulator.

    0
  • Ed79

    Great. Thank you for your help, Ted. I was able to get my display working properly. The issue was with the segment bi-direction. Once i was able to initialize the Entry Mode Set command with "RE=1" it cleared up the mirror issue.

    0
  • Ted M.
    NHD Staff

    Hi Ed79,
    It's good to hear you have it working.Thanks for the update!

    Regards,

    0
  • nathmaheshmp

    Is there a way I could set those bits in VHDL without the function sets. I am setting output pins with instruction code for fundamental commands. How would I communicated with ‘RE’?

    0
  • Ted M.
    NHD Staff
    Hi nathmaheshmp,

    RE can be controlled in this manner:


    There are three sets of command set in US2066: Fundamental Command SetExtended Command Set and OLED Command Set.
    These three command sets can be selected by setting logic bits IS, RE and SD accordingly.
     
    In order to control the "RE" bit, it is necessary to use the Fundamental Command Set of the US2066 controller (listed on pages 26-28 in Table 6-1).

    Use the "Function Set" Command to set bit " D1" to control the state of "RE" and set bit "D0" to change the state of "IS".


    US2066 Datasheet: https://www.newhavendisplay.com/resources_dataFiles/datasheets/OLEDs/US2066.pdf

    Regards,
     

     

    0

Please sign in to leave a comment.