Author Topic: How to reset NHD-0216SZW-BY5?  (Read 3002 times)

a_horst

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
How to reset NHD-0216SZW-BY5?
« on: April 06, 2018, 08:25:11 AM »
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. :)

Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 384
  • Karma: 10
    • View Profile
Re: How to reset NHD-0216SZW-BY5?
« Reply #1 on: April 11, 2018, 08:08:16 AM »
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 (http://www.newhavendisplay.com/specs/NHD-0216SZW-BY5.pdf)

a_horst

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: How to reset NHD-0216SZW-BY5?
« Reply #2 on: April 12, 2018, 04:50:57 AM »
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

jamespandit

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: How to reset NHD-0216SZW-BY5?
« Reply #3 on: May 05, 2018, 06:18:17 AM »
Been encountering a similar issue with NHD-0216SZW-BY5; have you been able to fix it yet?

tocnaza

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: How to reset NHD-0216SZW-BY5?
« Reply #4 on: October 23, 2018, 09:08:49 AM »
Hi all!

I have the same problem. :(

regards,

Alee_S

  • Administrator
  • Jr. Member
  • *****
  • Posts: 53
  • Karma: 0
    • View Profile
Re: How to reset NHD-0216SZW-BY5?
« Reply #5 on: November 28, 2018, 12:45:43 PM »
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.
 

Jordan82

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: How to reset NHD-0216SZW-BY5?
« Reply #6 on: July 12, 2019, 12:00:45 AM »
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.

Amelia22

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: How to reset NHD-0216SZW-BY5?
« Reply #7 on: August 08, 2019, 06:47:46 AM »
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. tellthebell

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 »

 

NHD-0216SZW-BG5 OLED artefacts and undefined patterns

Started by GeroFBoard OLEDs

Replies: 2
Views: 3444
Last post January 28, 2017, 07:18:49 AM
by GeroF
NHD-0216SZW-BG5 compatibility?

Started by w1jsbBoard OLEDs

Replies: 3
Views: 7314
Last post April 18, 2014, 08:30:52 AM
by Michael_L
NHD-3.12 SSD1322 serial synchronization reset

Started by atdownBoard OLEDs

Replies: 0
Views: 1181
Last post August 15, 2018, 10:01:50 AM
by atdown
NHD-7.0-800480EF-ATXV reset

Started by lensfocusBoard TFTs

Replies: 3
Views: 5736
Last post April 24, 2014, 02:16:07 PM
by lensfocus