How to reset NHD-0216SZW-BY5?

Comments

7 comments

  • Saurabh_B

    The first thing you would have to do is to add a short delay when the power is applied.
    Then before you start writing I would recommend sending the return home command.

    There is also a clear display command that would be able to "reset" the screen to a blank state and move your cursor to the home position as well.

    I would recommend adding delays to the end of your write functions. The max execution times are listed in the instruction table.
    Page 7 https://newhavendisplay.com/content/specs/NHD-0216SZW-BY5.pdf 

    0
  • a_horst

    Unfortunately this doesn't leads to success

    As i noticed in the datasheet at the end a section "Initialization Sequence", do I have to apply this sequence always when turning it on?

    Or can I assume that like the "HD44780" and identical controller, it has a internal reset circuit, which (when power is turned on) initializes it to the following:
    1.   Display clear
    2.   Function set:
        DL = 1; 8-bit interface data
        N = 0; 1-line display
        F = 0; 5 × 8 dot character font
    3.   Display on/off control:
        D = 0; Display off
        C = 0; Cursor off
        B = 0; Blinking off
    4.   Entry mode set:
        I/D = 1; Increment by 1
        S = 0; No shift

    0
  • jamespandit
    Been encountering a similar issue with NHD-0216SZW-BY5; have you been able to fix it yet?
     
    James Pandit

    0
  • tocnaza

    Hi all!

    I have the same problem.   :(

    regards,

    0
  • Alee_S

    Unfortunately, the controller in NHD-0216SZW-BY5 is not as similar to the controllers a_horst listed, in that it doesn't have an internal reset counter that resets memory address's to its original location.

    The initialization sequence will run anytime the display is reset, so in order to reset the DDRAM address to the original location, it must have the clear screen and return home command at the end of the initialization sequence.

    Including those commands should hopefully solve these issues. If something is still wrong, please let us know.

    0
  • Jordan82

    The OLED has slightly different timing than the LCD (this can be seen in the datasheets for the displays, specifically the command tables).  One main difference is the clear display command.  With the OLED, you need a minimum of 2ms delay after executing this command.  The other commands have slightly higher execution times as well, so these would also need to be accounted for if the requirements are not being met.

    Also, can you make sure pin 3 is left as a no connect?  The same goes for pins 15&16.  You should not need to change any jumpers, as the OLED comes default as 6800 mode like the LCD.

    0
  • Amelia22
    Hi guys,
    I got a NHD-0216SZW-BY5 connected to a Arduino similar board and use the LiquidCrystal library like in your example code.
    Basically i have no troubles to get output on the screen. Only when i reset, upload new code or plug out and in the supply too fast, it starts writing at the wrong position and/or magic numbers. 

    Due to this I guess the content in the RAMs is not lost fast enough.

    So my question now would be - what commands would I have to send initially to the controller to avoid this?

    Thanks already in advance for every helpful though/answer. 
     

    I'm having the same problem as the others.
     
    « Last Edit: August 09, 2019, 02:43:40 AM by Amelia22 »
    0

Please sign in to leave a comment.