Pages: 1 [2] 3 4   Go Down
Author Topic: Newhaven NHD-C0220AZ-FSW-FTW  (Read 3167 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged


Dallas, TX
Offline Offline
Sr. Member
****
Karma: 10
Posts: 318
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

dhenry, thank you very much for our response. Can you please explain
Quote
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!
Logged

Dallas, TX
Offline Offline
Sr. Member
****
Karma: 10
Posts: 318
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

dhenry, thank you very much for our response. Can you please explain
Quote
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.
Logged

Dallas, TX
Offline Offline
Sr. Member
****
Karma: 10
Posts: 318
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.

Quote
What is the regular code, where?

The code used to drive a regular hd44780 display.

Quote
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.

Quote
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.
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 25
Posts: 4108
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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
« Last Edit: December 08, 2012, 12:02:10 am by floresta » Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 25
Posts: 4108
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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


Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Dallas, TX
Offline Offline
Sr. Member
****
Karma: 10
Posts: 318
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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:

Quote
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:
Quote
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.
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 25
Posts: 4108
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Quote
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



Logged

Pages: 1 [2] 3 4   Go Up
Jump to: