Pages: [1]   Go Down
Author Topic: Anyone have any code for the NHD-C0220AA-FSW Newhaven Display?  (Read 834 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

I am not using the Liquid Crystal h file or any code in the Arduino sketchbook. I need the cursor on my display to go to the next line.  smiley-confuse smiley-confuse smiley-confuse
Logged

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

I am not using the Liquid Crystal h file or any code in the Arduino sketchbook. I need the cursor on my display to go to the next line.  smiley-confuse smiley-confuse smiley-confuse
Well you haven't provided a link to the product datasheet so unless someone happens to recognize the part number you will only be getting educated guesses.

Here's mine.  Your display may very well have a controller whose instruction set and memory setup match those of the HD47780.  In that case the information found by following the LCD Addressing link at http://web.alfredstate.edu/weimandn may help you figure out what to do.  You have to use that information to figure out the address of the 'next line' and then use the 'Set DDRAM address' instruction to set the cursor to that address.

Watch out for the power/contrast connections on the New Haven displays, they are not always the same as those of other displays.


Don
« Last Edit: January 15, 2013, 10:05:43 pm by floresta » Logged

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

Hi, thank you...here is the datasheet. This is my second time inquiring about these displays. The first one was using the NHD-C0220AZ which was a 5V display and would not work with a 3.3V Arduino Pro Mini. Now I have changed the display and have most of the code to get it going but I am having trouble moving the cursor(to the second line). It will be easy once I find which command it is. If you know anything about these commands please reply. Thank you for your help I will take a look at your link.

http://www.newhavendisplay.com/specs/NHD-C0220AA-FSW-FTW.pdf
Logged

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

Hi, thank you...here is the datasheet. This is my second time inquiring about these displays. The first one was using the NHD-C0220AZ which was a 5V display and would not work with a 3.3V Arduino Pro Mini. Now I have changed the display and have most of the code to get it going but I am having trouble moving the cursor(to the second line). It will be easy once I find which command it is. If you know anything about these commands please reply. Thank you for your help I will take a look at your link.

http://www.newhavendisplay.com/specs/NHD-C0220AA-FSW-FTW.pdf

Well, the address for the first character of the second line is 0x40, if that's a big enough clue.
Logged

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

It looks like NHD calls the command 'DD RAM Address Set'.

If you want to put the cursor at address 0x40 then the seven-bit binary version of this address would be 100 0000.  

To convert this seven-bit address to a command (aka an instruction) you would put the address bits into DB6 <--> DB0 and then set DB7 to specify the 'DD RAM Address Set' command.

This means that your specific DD RAM Address Set command would be 1100 0000.

So you would send this value, which in hex is 0xC0 to the instruction register of the LCD controller.

[Edit] CAUTION:  Pin 2 is contrast and pin 3 is VDD, reversed from just about every other LCD.


Don
« Last Edit: January 16, 2013, 01:50:39 pm by floresta » Logged

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

It looks like NHD calls the command 'DD RAM Address Set'.

If you want to put the cursor at address 0x40 then the seven-bit binary version of this address would be 100 0000.  

To convert this seven-bit address to a command (aka an instruction) you would put the address bits into DB6 <--> DB0 and then set DB7 to specify the 'DD RAM Address Set' command.

This means that your specific DD RAM Address Set command would be 1100 0000.

So you would send this value, which in hex is 0xC0 to the instruction register of the LCD controller.

[Edit] CAUTION:  Pin 2 is contrast and pin 3 is VDD, reversed from just about every other LCD.


Don
That's definitely a big enough clue. smiley
Logged

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

Thank you very much! Much appreciated!
Logged

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

Worked great, can't thank you enough! BTW, is anyone else having an issue with arduino1.0.3 being really slow to compile or other issues?

Thanks again! Love this forum!
Logged

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

I am am wondering about the slow compiling for 1.0.3

I can leave ANY sketch sitting there for an hour waiting for it to compile with no results. The status bar just sits there, half done. It has on occasion compiled properly, in seconds. But that is extremely rare.

To be clear, I'm talking about even the simplest of sketches: Blinky or less, an Empty Sketch.

What's up?

I use Win7.

I've searched the web and have found nothing useful.

Thanks
Logged

Pages: [1]   Go Up
Jump to: