Go Down

Topic: Anyone have any code for the NHD-C0220AA-FSW Newhaven Display? (Read 993 times) previous topic - next topic

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.  :~ :~ :~

floresta

#1
Jan 16, 2013, 04:04 am Last Edit: Jan 16, 2013, 04:05 am by floresta Reason: 1

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.  :~ :~ :~

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

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

Papa G


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.

floresta

#4
Jan 16, 2013, 07:46 pm Last Edit: Jan 16, 2013, 07:50 pm by floresta Reason: 1
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

Papa G


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. :)


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!

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

Go Up