NHD-0216K3Z-FL-GBW
I am Upgrading a Timelapse Motion controller that uses a NHD-0216K3Z-FL-GBW display. First question is the NHD-0216K3Z-FL-GBW-V3 the same or compatible. I purchased a NHD-0216K3Z-FL-GBW-V3 and it worked mostly but the contrast was very low and the display pulsed when I was moving the stepper motors on the controller. I adjusted the the contrasts from 50% to 100% in the sketch which made a bit of difference but was still a bit dim. I
I think I have fried the LCD unfortunately. I accidentally shorted the 5v pin with one of the little tabs that twist to hold the LCD together and not the LCD powers up and the backlight is on but no display.
I have very little knowledge of electronics or arduino so any help would be gratefully appreciated.
-
Hi George,
Both parts get powered by 5V. Could you please confirm the power input?
The V3 has a newer firmware, which might explain the difference in the contrast. Could you try changing the contrast value?
To change the contrast, you would need to send the following:
command(0xFE);
command(0x52);
data(0x40);Also, are you perhaps sharing the same power line to your stepper motor and the display?
If you want to change the brightness of the display, you can do so by the following:
command(0xFE);
command(0x53);
data(0x08);0 -
Hi
Thanks for the reply. Yes, the power is 5v.
Sorry for my lack of knowledge but where do I add the code suggested? This is the code that is for the lcd.
/Setup LCDlcd.setup();delay(100);draw(0,1,2); // Setup Completedraw(1,2,1); // Version Number//strcpy_P(lcdbuffer1, (PGM_P)pgm_read_word(&(setup_str[0]))); // Necessary casts and dereferencing, just copy.//lcd.at(2,1,lcdbuffer1);lcd.contrast(50);lcd.cursorOff();lcd.bright(4);delay(prompt_time*2);lcd.empty();delay(100);0 -
Hi George,
Since I don't know how your code or library is written, I would only suggest after
lcd.contrast(50);
Do you know what interface protocol you are doing? If you would like to use our code, I could point you to the example code we have based on the protocol. You can confirm the protocol you are using by looking at R1 and R2 at the back of the display.
0 -
Both are open. Rs-232.
0 -
Hi George,
Thank you for confirming. Could you please try the following code below
/*
* NHD-XXXXX3Z-RS232 Series
* LCD Pin 1 goes to pin 8 on Arduino
* LCD Pin 2 goes to ground
* LCD Pin 3 goes to 5V
*/
#define P1 8#include <SoftwareSerial.h>
#define txPin P1SoftwareSerial LCD = SoftwareSerial(P1, txPin);
void clearLCD(){
LCD.write(0xFE); //command flag
LCD.write(0x51); //clear command.
delay(05);
}void setup() {
pinMode(txPin, OUTPUT);
delay(20);
//Start 9600 Baud Rate
LCD.begin(9600);
delay(15);// Display ON
LCD.write(0xFE);
LCD.write(0x41);
delay(5);// Cursor Home
LCD.write(0xFE);
LCD.write(0x46);
delay(5);//set Contrast
LCD.write(0xFE);
LCD.write(0x52);
LCD.write(40);
delay(5);//Brightness
LCD.write(0xFE);
LCD.write(0x53);
LCD.write(8);
delay(5);
}void loop() {
clearLCD();
for (int i=0;i<80;i++){
LCD.write(0xFF);
}
delay(3000);
//Display Firmware Version
LCD.write(0xFE);
LCD.write(0x70);
delay(3000);
clearLCD();
LCD.print("XXXXXXXXXXXXXXXXXXXX");
//Change Cursor position to Line 2
LCD.write(0xFE);
LCD.write(0x45);
LCD.write(0x40);
LCD.print("XXXXXXXXXXXXXXXXXXXX");
//Change Cursor position to Line 3
LCD.write(0xFE);
LCD.write(0x45);
LCD.write(0x14);
LCD.print("XXXXXXXXXXXXXXXXXXXX");
//Change Cursor position to Line 24
LCD.write(0xFE);
LCD.write(0x45);
LCD.write(0x54);
LCD.print("XXXXXXXXXXXXXXXXXXXX");
delay(3000);clearLCD();
LCD.print("ZZZZZZZZZZZZZZZZZZZZ");
//Change Cursor position to Line 2
LCD.write(0xFE);
LCD.write(0x45);
LCD.write(0x40);
LCD.print("ZZZZZZZZZZZZZZZZZZZZ");
//Change Cursor position to Line 3
LCD.write(0xFE);
LCD.write(0x45);
LCD.write(0x14);
LCD.print("ZZZZZZZZZZZZZZZZZZZZ");
//Change Cursor position to Line 24
LCD.write(0xFE);
LCD.write(0x45);
LCD.write(0x54);
LCD.print("ZZZZZZZZZZZZZZZZZZZZ");
delay(3000);LCD.print("HHHHHHHHHHHHHHHHHHHH");
//Change Cursor position to Line 2
LCD.write(0xFE);
LCD.write(0x45);
LCD.write(0x40);
LCD.print("HHHHHHHHHHHHHHHHHHHH");
//Change Cursor position to Line 3
LCD.write(0xFE);
LCD.write(0x45);
LCD.write(0x14);
LCD.print("HHHHHHHHHHHHHHHHHHHH");
//Change Cursor position to Line 24
LCD.write(0xFE);
LCD.write(0x45);
LCD.write(0x54);
LCD.print("HHHHHHHHHHHHHHHHHHHH");
delay(3000);
}0
Please sign in to leave a comment.
Comments
5 comments