Newhaven NHD-C0220AZ-FSW-FTW

I recommend going back to square 1. Remove connections to arduino, remove that 10K resistor (what's it for?), power the lcd with 5V from that UNO, adjust contrast until you can see blocks. If that all works, power the lcd with 3.3V and readjust contrast until you can see blocks.

If the above works, use the UNO and proper contrast for 5V supply and run an lcd sample code.

Ugh. :~ Well, I have just finished doing most of that. I am not using the UNO, I can't. I am using the Pro-Mini but nonetheless, I have done that. I even took a separate 5V supply and attached it to the LCD (pins 3, 2, 1) with the pot on a separate breadboard and played with voltage down to zero and gotten nothing. I am at wits end. I will keep trying. If I come to any conclusions I will post again. Thank you very much for your help....If anyone out there knows anyone out there that has used this Display with an Arduino, Please please post. Cheers

Also, If you have any sample code, could you please post? I really appreciate it. Thank you!

raviolidon:
Also, If you have any sample code, could you please post? I really appreciate it. Thank you!

There are several in arduino IDE.

What about soldering? Did you do a good job with soldering?

raviolidon:
Also, If you have any sample code, could you please post? I really appreciate it. Thank you!

In the IDE, File > Examples > LiquidCrystal

I use a lot of the New Haven Display products and the standard LiquidCrystal library works with most of them. I haven't used the specific one you are trying to apply, however.

I guess it's admirable to try to write your own driver but if it was me I would try the standard library first. If you do decide to try to fix yours, I will suggest that those 10 mS delays you've got everywhere are waayyyy to long, I think you would be better off using delayMicroseconds() and use the values from your data sheet.

OK, I will change it. I had delays like that so I could initially see what was happening. I will take a look at the examples but I am sure that I searched extensively for something on this particular LCD and found nothing. Thank you again, keep posting please if you hear anything. Cheers

there is 3.3V

Most of those devices require around 4v on the contrast pin vs. the positive rail - thus they are rated for 5v applications.

In a 3.3v environment, you will need to create a negative voltage (-1v or more) and apply it to the contrast pin (Vdd in your case).

There are many ways to create that. A simple one would be to send a pulse train to a charge pump (two diodes + two caps). For example, you can use the analog write function to do that.

The display looks to be hd44780 compliant so the regular code should work.

around 4v on the contrast pin vs. the positive rail

That spec is listed as Vdd-V5 in the datasheet, ranging from 4.3v - 4.5v typical.

dhenry, thank you very much for our response. Can you please explain

The display looks to be hd44780 compliant so the regular code should work.

How do I find out it is hd44780 compliant? What is the regular code, where? I am fairly new to this and the only thing that I know it is that Newhaven has an initialization set up that is written for an 8051 (does not work with Arduino). Do you mean regular initialization code for Arduino or the NT7605 controller? Thanks so much for your help!

raviolidon:
dhenry, thank you very much for our response. Can you please explain

The display looks to be hd44780 compliant so the regular code should work.

How do I find out it is hd44780 compliant? What is the regular code, where? I am fairly new to this and the only thing that I know it is that Newhaven has an initialization set up that is written for an 8051 (does not work with Arduino). Do you mean regular initialization code for Arduino or the NT7605 controller? Thanks so much for your help!

Look at reply #17. Are you using the Arduino IDE? There are many example sketches under the File > Examples menu. Assume that the controller is hd44780 compliant and try the examples. "Hello World" would be a good place to start and it has good comments. Follow them when you hook up your LCD, remembering that your V5 is on a different pin.

dhenry:

there is 3.3V

Most of those devices require around 4v on the contrast pin vs. the positive rail - thus they are rated for 5v applications.

In a 3.3v environment, you will need to create a negative voltage (-1v or more) and apply it to the contrast pin (Vdd in your case).

There are many ways to create that. A simple one would be to send a pulse train to a charge pump (two diodes + two caps). For example, you can use the analog write function to do that.

That makes absolutely no sense at all and is very likely to damage the display. The contrast pin is V5, not Vdd.

I am using the NHD devices that are rated down to 3.3V and I'll admit the contrast is just usable with 3.3V on V5. If you can, power your display and Arduino with 5V as recommended before and see what happens.

How do I find out it is hd44780 compliant?

The lcd datasheet provides a link to the controller datasheet. You can compare the commands there vs. those in the hd44780.

What is the regular code, where?

The code used to drive a regular hd44780 display.

I am fairly new to this and the only thing that I know it is that Newhaven has an initialization set up that is written for an 8051 (does not work with Arduino).

The device doesn't care if the signal is sent from a 8051/arduino/any other beasts, as long as they are the right waveform.

Do you mean regular initialization code for Arduino or the NT7605 controller?

Coding to a datasheet is fairly easy, as long as you understand the datasheet.

In this case, you need to make sure that the power is up; you have the right contrast; and then worry about the code.

Your code has numerous places that can be improved upon.

But now, you need to make sure that the device is powered up correctly and you have the contrast.

If you need a way to generate negative voltage, net me know.

I set E, RW low and RS stays low to write commands (setting mode to 1 means RS low, if mode sees a 0 then RS sees a 1 and thats when we write to DDRAM), then E goes high, data gets pushed through and then E goes low and high...this is how I read it. I hope that is correct.

That is not correct. The diagrams on page 8 of your datasheet show essentially the same sequence of events as shown on the datasheets for all of the other controllers (I didn't check the actual times, just the sequence). My description in the last paragraph of reply #1 describes what is happening.

Since the actual data transfer occurs on the falling edge of the 'E' pulse you should change the logic analyzer configuration to put that point near the center of the display. That way we can check the what is happening both before and after the data transfer.

I didn't read your code, but most likely it requires some changes. Make sure you use the 'Code' tags when you post your corrected code. You should consider just driving R/W low at the beginning of your program and leaving it there since you are not ready to deal with the busy flag at this point.

Don

That makes absolutely no sense at all and is very likely to damage the display. The contrast pin is V5, not Vdd.

What doesn't make sense?

When you are running the device from a 5 volt supply the supply voltage for the controller is 5 volts above GND and the supply for the LCD (frequently called the contrast voltage) is 4.4 volts below that (at 25C). This puts the contrast pin at 0.6 volts above GND.

When you are running the device from a 3.3 volt supply, and if the contrast voltage is still 4.4 volts (or so) below that, then the contrast pin must indeed be negative with respect to GND.

I don't think there is any reason to suspect that this may harm the device as it is quite normal for an LCD to require a negative contrast voltage, especially those designed to run at low temperatures.

Don

I would recommend OP to use UNO and 5V, follow a standard tutorial, test the display with liquidcrystal library to make sure it works. Don't use your own code or 3.3V Only creates more uncertainty.

floresta:

That makes absolutely no sense at all and is very likely to damage the display. The contrast pin is V5, not Vdd.

What doesn't make sense?

When you are running the device from a 5 volt supply the supply voltage for the controller is 5 volts above GND and the supply for the LCD (frequently called the contrast voltage) is 4.4 volts below that (at 25C). This puts the contrast pin at 0.6 volts above GND.

When you are running the device from a 3.3 volt supply, and if the contrast voltage is still 4.4 volts (or so) below that, then the contrast pin must indeed be negative with respect to GND.

I don't think there is any reason to suspect that this may harm the device as it is quite normal for an LCD to require a negative contrast voltage, especially those designed to run at low temperatures.

Don

While what you say is true for some LCDs and in particular for LCDs designed to run at low temperature, I don't know if that applies to this COG display with the NT7605 controller. I say that because the controller data sheet says:

All voltage values are referenced to GND = 0V
V1 toV5, must maintain VDD ?V1 ?V2 ?V3 ?V4 ?V5?GND.(my emphasis)

V5 is the contrast voltage for this display and the data sheet specifically calls for it to be positive with respect to ground.

The warning in my comment was because of this statement:

In a 3.3v environment, you will need to create a negative voltage (-1v or more) and apply it to the contrast pin (Vdd in your case).

Vdd is not the contrast pin and accidentally hooking it to a negative voltage could well damage the display.

All voltage values are referenced to GND = 0V
V1 toV5, must maintain VDD ?V1 ?V2 ?V3 ?V4 ?V5?GND.(my emphasis)

V5 is the contrast voltage for this display and the data sheet specifically calls for it to be positive with respect to ground.

Good point, but that is from the controller datasheet and we are talking about the display. I'm not sure it would apply.

I am not sure that the 'V5' in your quote above and the 'V5' designation for pin 2 of the LCD module are one and the same. I have never seen the 'contrast' pin labeled V5 before, but then again I've never seen it implemented on pin 2 before either.

Don

liudr:
I would recommend OP to use UNO and 5V, follow a standard tutorial, test the display with liquidcrystal library to make sure it works. Don't use your own code or 3.3V Only creates more uncertainty.

I agree.

After you have ascertained that the display works as above you could try it again at 3.3 volts. Make sure that your 3.3 v supply can furnish the required current.

Don

From reply #2

the first line of 'Function set' on page 25 is 000010XXXX so I call setdata and send it 000010 (which is 2 binary or 0x02 hex), then the next line and the next line then a delay. I believe that function set for the LCD should be set.....Again this is how I read it, I hope this is correct.

First of all, to understand what is going on you should first read an explanation of the initialization routine which you can find by following the LCD Initialization link at http://web.alfredstate.edu/weimandn. This explanation is for the Hitachi chip but the Instruction Set is the same and the initialization appears to be the same except that this chip may not need the reset sequence at the beginning.

I am not sure what you are questioning as far as the 'Function set' on page 25 is concerned. I did take a look at the rest of the flowchart on page 25 and have found an error which you have faithfully followed. The second line of the Display ON/OFF Control should be shown as: 0 0 1 D C B X X X X

Don

Thank you all for your responses, it is greatly appreciated! I will have to go through and follow recommendations, I will post follow ups on my results. I do have to start at the beginning now because I removed the LCD altogether and just put it to a 3.3V then 5V supply and trim the pot up and down, down to zero and could not get anything out of it.

floresta, Thank you very much for the link and for the correction on the datasheet! How did you figure that out? Very bad for beginners :~
I was trying to give an example of how I was doing the initialization and just used 'Function Set' as an example, I wasn't questioning it. Also, I cannot use an UNO I have to have everything hooked up to the Pro-Mini. Its not me, I am just following the protocol.

Thanks Again!

PS I went through the initialization process again and the output from the analyzer and myself and a co-worker are certain that it the correct sequence.