Double Height Font on a 763-NHD-0420CW-AW3 with Phyton on a Pi3b

Comments

4 comments

  • Ted M.
    NHD Staff

    The NHD-0420CW-AW3 OLED display has the US2066 controller/driver built in which does support Double-Height font characters.
    The command table in the display's datasheet includes the instruction code on pg.8.

    Please also refer to page 37 of the US2066 datasheet for more details. https://newhavendisplay.com/content/app_notes/US2066.pdf 

    See our Github for a US2066 library. https://github.com/NewhavenDisplay/NHD_US2066

    Another Github link with python code for this display that may be useful:  https://github.com/wjskrydl/nhd-oled


    Best Regards,

    0
  • garbage98

    I will look into it. Thanks!

    0
  • garbage98


    I've found the command for controlling Line Size in the data sheet.
    See datasheet pg. 8 https://www.mouser.de/datasheet/2/291/NHD-0420CW-AW3-1266321.pdf

    Can you help me figure out how to send this command to my display? I'm using the python module you've linked above.

    def __command(self, byte):
            self.__bang(byte, True)
    I'm unsure how to translate this command into byte format.

    Thank you
    « Last Edit: February 28, 2019, 05:25:39 AM by garbage98 »
    0
  • Alee_S

    Hi there,
     

    The states of your D0-D7 bits will determine the hex value for your command.

    Since the double height font feature is in the 'function set' command, you will need to send the 'function set' command. 
    D0 can change the internal 'IS' bit to a 1 or 0, which can allow to use other commands listed in the datasheet. For now, I would advise to keep it low.
    D1 will turn the internal 'RE' bit to 0.
    D2 should be 1 to enable double height.
    D3 should be 1, since you are operating with a 4-line display.
    D4 can be either 1 or 0, indicated by the star.
    We are also instructed to keep D5 as 1, and D6 and D7 as 0.

    If we convert these 8 bits to hex value, we would get (0x2C) or (0x3C), depending on what your D4 value is.


    Based off this, you may try and send either self.__command(0x2C) or self.__command(0x3C) at the end of your  def __begin(self): function.
     
    Hopefully this will do the trick!

    0

Please sign in to leave a comment.