Author Topic: NHD-0220FZ-FSW-GBW-P-33V3  (Read 1539 times)

timbro

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
NHD-0220FZ-FSW-GBW-P-33V3
« on: January 03, 2019, 06:31:11 AM »
Hello all...
We are trying to operate this display (NHD-0220FZ-FSW-GBW-P-33V3) with 4 bits and have achieved absolutely nothing so far.
Now we are questioning if we have understood the data sheet and have all the correct connections we need.
First we tried connecting everything with DB0-DB3 grounded. Then we tried DB0-DB3 not connected. Now we have tried connecting to a header on the 12 pin side only. Still nothing.
All the voltages are there.
Interestingly, we have a 10k pot on the contrast and cannot get any change in the display from one end of the pot to the other. I figured this is strange because I would have thought this was a quite separate to actually configuring the display for operation.
Finally, thinking we may have copped a faulty display, we tried another and it is exactly the same - completely unresponsive. We have another 8 more but I suspect they will all be the same.
We can drive several other displays with our code, so I don't think we are too far out with what we are doing code wise.
Has anyone got some configuration code that we make some comparisons with? or are there an secrets with this display that we should know about.
Thanks in advance...
Cheers, T

Alee_S

  • Administrator
  • Jr. Member
  • *****
  • Posts: 52
  • Karma: 0
    • View Profile
Re: NHD-0220FZ-FSW-GBW-P-33V3
« Reply #1 on: January 04, 2019, 10:27:04 AM »
Hi timbro,

As far as connecting DB0-DB3, you can connect them to ground or leave them disconnected, as either option should work for 4-bit parallel interface.

Please see the sample code provided below as a reference, which I have tested and verified to work. The code provided is written for an Arduino Uno. 

Code: [Select]
/******** INITIAL DEFINITIONS***************/

#define E_Pin 10
#define R_W    9
#define R_S    8

/************************ CHAR STRING**********/

char const text1[] = ("NEWHAVEN DISPLAY");
char const text2[] = ("2x20 LCD DISPLAY");

/************ Functions************/
void latch(){                           // command to latch E
  digitalWrite(E_Pin, HIGH);            // Latch
  delay(1);
  digitalWrite(E_Pin, LOW);
  delay(20);
}
void command(char i){
  PORTD = i;
  digitalWrite(R_S, LOW);               // Command
  digitalWrite(R_W, LOW);               // Write
  latch();                              // take upper 4 bits
  i = i<<4;                             // shift 4 bits
  PORTD = i;                            // Take lower 4 bits
  latch();
}
void data(char i){
  PORTD = i;
  digitalWrite(R_S, HIGH);              // Data
  digitalWrite(R_W, LOW);               // Write
  latch();                              // take upper 4 bits
  i = i<<4;                             // shift 4 bits
  PORTD = i;                            // Take lower 4 bits
  latch();
}

/***********INITIALIZE DISPLAY************************/

void init1(){
digitalWrite(E_Pin, LOW);                                                     
 delay(100);                            //Wait >15 msec after power is applied
 PORTD=0x30  ;                         // Put 30 on port D           
 delay(30);                             //must wait 5ms, busy flag not available
 latch();                              //command 0x30 = Wake up
 delay(10);                             //must wait 160us, busy flag not available
 latch();                              //command 0x30 = Wake up #2
 delay(10);                             //must wait 160us, busy flag not available
 latch();                              //command 0x30 = Wake up #3
 delay(10);                             //can check busy flag now instead of delay 
 PORTD = 0x20;                          //put 0x20 on the output port (NEEDED TO SET 4-bit INTERFACE)         
 latch();     
 command(0x28);                         //Function set: 4-bit/2-line 
 command(0x28);                       
 command(0x0F);                         //Display ON; Blinking cursor
 command(0x06);                         //Entry Mode sets
}


void clear_screen(){                    // clear display
 command(0x01);
}
void ret_home(){                        // Return to home position
 command(0x02);
}
void disp(){                            // DISPLAY TEXT
  clear_screen();
  ret_home();                                 // Brings back to First Line
  for( int i = 0; i<16; i++){
    data(text1[i]);
  }
  command(0xC0);                              // Second Line
  for (int i = 0; i<16; i++){
    data(text2[i]);
  }
  ret_home();
}

void setup() {
 
  DDRD = 0xFF; // First 8 pins of PORT D as output
  DDRB = 0x07; // Port B first 3 pins as output
  init1();
  disp();
}

void loop() {
 
  delay(1000);
  while(1);
 
}

If the issue persists, can you provide/upload the following:
-Image of your hardware connections?
-Measured voltages across Pin 3 (contrast pin) at both limits of the POT? 
-The P/N of the other displays you can drive with your code?



timbro

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: NHD-0220FZ-FSW-GBW-P-33V3
« Reply #2 on: January 12, 2019, 11:10:21 PM »
Hi Alee_S,
I have a couple of other brands of 5Vdc 1602 LCD displays laying around which we have tested our code on and we are able to make these work ok but we are not able to find the same success with the Newhaven display.
We do not do too many PIC projects so initially we thought it may have been something lacking in our understanding using these devices however, we rebuilt the project using an STM8 device and again, we have only had success with other displays - not the Newhaven display.
I do have 10 of them and have tried two different ones just in the off chance that one was faulty.
Have you configured your delay function for a specific time period? ...and if so what is that period?

Alee_S

  • Administrator
  • Jr. Member
  • *****
  • Posts: 52
  • Karma: 0
    • View Profile
Re: NHD-0220FZ-FSW-GBW-P-33V3
« Reply #3 on: January 14, 2019, 04:19:50 PM »
The delay function is set for 1 ms. So a delay(1000) = 1000 ms, or 1 second.

Did you have a chance to review the code provided vs the code used for other displays for their similarities/differences?

Once again, may you please upload images of your hardware connections, along with your measured contrast voltage across both limits of the POT? This would help me get closer to determining where the root issue lies.

Also, if you can provide P/N of some of the other displays you have successfully powered on, I can review their specs to see if there are software/hardware differences between our display and the other displays you have been using.


timbro

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: NHD-0220FZ-FSW-GBW-P-33V3
« Reply #4 on: January 17, 2019, 05:37:35 AM »
Hi Alee_S
I found a post on this forum related to a display with the same driver that is 4 x 20 and he was saying that he could only get his display to work in 1-line mode. I decided that I would try changing it to 1-line mode and see if it would work and it certainly did.
So my problem has now advanced to trying to make the display work with both lines. The guy did work out a solution however it is not explained very clearly and I have not been able to work out what the solution actually was. The link to the post is below.

https://www.newhavendisplay.com/NHD_forum/index.php/topic,1053.msg2502.html#msg2502

It would be very helpful if you could decipher this guys final comments and let me know what it actually means.

Kind regards,
 

Alee_S

  • Administrator
  • Jr. Member
  • *****
  • Posts: 52
  • Karma: 0
    • View Profile
Re: NHD-0220FZ-FSW-GBW-P-33V3
« Reply #5 on: January 17, 2019, 09:34:57 AM »
Hi timbro,

For more information on 'Internal Reset Circuit', please see the attachment below, taken from Pg. 22 of the ST7066U controller datasheet. Please note those instructions are executed in the initialization section of the code I have provided.

The LCD working in 1-line mode is a good sign! It seems that under 2-line mode, the LCD is not receiving enough contrast to show the text properly. Try adjusting the contrast voltage on Pin 3, and hopefully that will do the trick.

timbro

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: NHD-0220FZ-FSW-GBW-P-33V3
« Reply #6 on: January 19, 2019, 05:36:48 AM »
Hi Alee_S,

There is no problem with contrast. it can be changed from 0.004 <-> 3.294 Vdc. It is a 10 turn pot and I have tried it across the full range.
By default the display is in 1-line mode. It has become pretty clear to us that it is not accepting 2-line configuration. Still have no idea why.
I have another question about your code... what does your PORTD consist of?
We are using 2 pins on the same port that we also use for DB4<->DB7, so we are setting these, (DB4<->DB7), bitwise - however, there is something quite strange - you apply 0x28 for 2-line mode (0010 1000)  - you don't send each nibble separately, so it would be very helpful to me if you could tell me exactly what you have connected to PORTB - bits 0 through 7, what are they connected to?

Kind regards   

Alee_S

  • Administrator
  • Jr. Member
  • *****
  • Posts: 52
  • Karma: 0
    • View Profile
Re: NHD-0220FZ-FSW-GBW-P-33V3
« Reply #7 on: January 25, 2019, 03:07:24 PM »
Hi again,

PORTD consists of my data lines(DB4-DB7 for 4-bit mode), while PORTB consists of my control lines(Enable, R/W, and R/S). 

You mentioned you have been using 2 additional pins on the same port as DB4-DB7. I would recommend separating your control lines and data lines and keeping them on separate Ports.


timbro

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: NHD-0220FZ-FSW-GBW-P-33V3
« Reply #8 on: January 28, 2019, 04:09:34 AM »
Hi Alee_S,
I am using separate ports for control and data now - nothing has changed.

timbro

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: NHD-0220FZ-FSW-GBW-P-33V3
« Reply #9 on: January 29, 2019, 07:32:13 AM »
Hi Alee_S,
By pushing sharply on the display while in 2-line mode, I can make out the correct characters on the first and second line.
When in 1-line mode, the contrast to view the characters is best set at practically 0 volts. Anything over a few millivolts and the characters fade out to nothing.
Very surprising....
When in 2-line mode, anywhere between 0V and 3.3V - display shows nothing but if i squeeze the display rapidly, i can see my text written correctly.
Someone come up with a explanation for that please.
Seems like using these displays are Newhavens best kept secret.
Happy to discuss this really crappy display.

Alee_S

  • Administrator
  • Jr. Member
  • *****
  • Posts: 52
  • Karma: 0
    • View Profile
Re: NHD-0220FZ-FSW-GBW-P-33V3
« Reply #10 on: February 11, 2019, 04:55:39 PM »
Hello timbro,

I'm sorry that you are experiencing these issues with our display for a long duration of time :-[

I have tried to replicate your problem at the lab, but to no avail. I verified the display works in 1-line and 2-line mode, and tried pressing on all sides of the display in both modes to see if there was any contrast change, but that did not make a difference in the display appearance.
If you would like a video reference, please let me know and I can send an e-mail with a video attachment. Unfortunately, the file size would be too big to attach in this post.

I have verified the contrast voltage range to be from 0.0 V - 1.2V, where 0V showed some visible blocks and intended characters/string, and 1.2V was the max voltage where characters would appear on the screen. Any voltage past 1.2V would be too high for any text to be shown on the display.
Please note the adjustment of the potentiometer is not linearly connected with the contrast; if using a 10k pot, setting the knob for a 5k resistance will not necessarily equate to half the supply voltage appear on the contrast.


You mentioned in your earlier e-mails you had a total of 10 of our displays, and I am assuming you are experiencing the same exact issue with all of them, is that correct? If so, can you provide the date codes of all those 10 displays? The date code can be found on the sticky label, located on the back of the display. Please see image below as a reference

Also, I mentioned in my previous posts to provide an image(s) of your connections to the display, but you have not provided them so far. It is extremely imperative to see how these connections are being made, so we can eliminate a faulty hardware connection being the crux of the problem. Please provide these images, as well as a schematic with your connections, if you have made one.

Having this information may get us closer to solving your issue!


« Last Edit: February 12, 2019, 09:36:32 AM by Alee_S »

timbro

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: NHD-0220FZ-FSW-GBW-P-33V3
« Reply #11 on: February 18, 2019, 04:00:26 AM »
Dear Alee_S,
Your message landed on the first day of my travel and I am due back in the office on Wednesday.
We are using a ST Discovery board with the display and the diagram I have sent previously. I have attached the datasheet of the discovery board so you can reference the diagram that I will send again now. We have tried various things which have made no difference at all. The last thing we tries was to supply Vdd to both pins - as this latest diagram shows.

As in my original post, we can use another brand of display and have both lines working in 4-bit data mode perfectly.

Can you be more specific in terms of what you want me to take images of? I have attached a photo anyway bit I am not sure if it is going to be useful to you.

Kind regards,
Tim

Alee_S

  • Administrator
  • Jr. Member
  • *****
  • Posts: 52
  • Karma: 0
    • View Profile
Re: NHD-0220FZ-FSW-GBW-P-33V3
« Reply #12 on: February 18, 2019, 05:01:00 PM »
Hi timbro,

Thank you for providing images of your hardware connections + schematics. The images you have provided are sufficient.

Quote
As in my original post, we can use another brand of display and have both lines working in 4-bit data mode perfectly.
Can you provide those displays P/Ns? We can review those displays datasheets and see where any differences may lie, which may possibly help us locate the issue.
Can you also try and disconnect the backlight anode and cathode pins, and see if there is any differences in the displays appearance?

timbro

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: NHD-0220FZ-FSW-GBW-P-33V3
« Reply #13 on: February 20, 2019, 02:05:05 AM »
Hi Alee_S,
The other displays are a generic  2 x 16's that use the Hitachi display controller (HD44780U).
Keep in mind that these are quite different in set up - not like it is a case of unplugging these and plugging in yours.
The datasheets attached...

Kind regards, T

Alee_S

  • Administrator
  • Jr. Member
  • *****
  • Posts: 52
  • Karma: 0
    • View Profile
Re: NHD-0220FZ-FSW-GBW-P-33V3
« Reply #14 on: May 23, 2019, 04:33:14 PM »
This topic was further supported via e-mail.

 

NHD-0420H1Z-FL-GBW-33V3 pull-ups and pull-downs in 4 bit mode

Started by richardwrightBoard Character LCDs

Replies: 3
Views: 6384
Last post December 15, 2014, 05:12:27 PM
by Michael_L
NHD-0420H1Z-FL-GBW-33V3 - 2 Lines Mode Problem

Started by gnyturanBoard Character LCDs

Replies: 6
Views: 6933
Last post October 29, 2015, 01:23:58 PM
by Saurabh_B
NHD-0420DZ-FL-YBW LCD Replacement by NHD-0420H1Z-FL-GBW-33V3

Started by sugumar.krishnasamyBoard Character LCDs

Replies: 6
Views: 6916
Last post April 03, 2015, 09:00:45 AM
by Paul_B
NHD-0108CZ-FSW-GBW-33V3 contrast voltage

Started by perkyBoard Character LCDs

Replies: 3
Views: 4773
Last post February 12, 2016, 04:01:29 PM
by perky
NHD-0208AZ-fsn-GBW-33V3 (CG ram characters not displayed

Started by pla.electroBoard Character LCDs

Replies: 0
Views: 1342
Last post June 11, 2018, 04:58:45 AM
by pla.electro