Newhaven Display Forum

Newhaven Products => OLEDs => Topic started by: cloudtree99 on December 03, 2018, 12:12:32 AM

Title: NHD-0420DZW-AY5 - Line3 and 4 reversed right and left.
Post by: cloudtree99 on December 03, 2018, 12:12:32 AM
Display:    NHD-0420DZW-AY5

Interface : parallel 4-bit mode

Usage:     Clear display and display text using Arduino Mega 2560. Nothing more complicated than that.

Problem :
Line 3 and 4's characters reversed  right and left.
please see below link image.

https://t1.daumcdn.net/cfile/tistory/99B9683A5C04C89608 (https://t1.daumcdn.net/cfile/tistory/99B9683A5C04C89608)

here's my arduino source code.
Code: [Select]
#include <LiquidCrystal.h>

LiquidCrystal lcd(30, 32, 5, 4, 3, 2);  // RS connected to Arduino digital pin 30

                                        // E  connected to Arduino digital pin 32

                                        // R/W connected to Ground

                                        // DB4 connected to Arduino digital pin 5

                                        // DB5 connected to Arduino digital pin 4

                                        // DB6 connected to Arduino digital pin 3

                                        // DB7 connected to Arduino digital pin 2

void setup()

{

  lcd.begin(20, 4);                      // 20 columns, 4 rows

}



void loop()



  lcd.clear();                          //clear LCD and set cursor for upper-left corner

  lcd.setCursor(0,0);                   //set cursor for column 0, row 0

  lcd.print("     Hello World    ");

  lcd.setCursor(0,1);                   //set cursor for column 0, row 1

  lcd.print(" New Heaven Display ");

  lcd.setCursor(0,2);                   //set cursor for column 0, row 2

  lcd.print("     Hello World    ");

  lcd.setCursor(0,3);                   //set cursor for column 0, row 3

  lcd.print(" New Heaven Display ");

  delay(1000);                          //delay for 1000ms (1 second)

}

why this happend?? Waht can I do something for solve this problem?
Title: Re: NHD-0420DZW-AY5 - Line3 and 4 reversed right and left.
Post by: Alee_S on December 11, 2018, 04:44:26 PM
Hello there!

Unfortunately I could not replicate the issue you are having, as I ported your attached code into my Arduino Mega 2560 using 4-bit parallel interface, and the display is working fine for me. This leads me to believe the code you've written isn't the issue.

I changed the "H_SHL_L" jumper as well, which is responsible for flipping the direction of the display, to see if it would give the same issue you've been having, but that also gave me the expected results.

Please contact us at (nhtech@newhavendisplay.com) and we can provide assistance in setting up an RMA and returning the display for analysis. I apologize for the inconvenience.