Newhaven Display Forum

Newhaven Products => Character LCDs => Topic started by: RS3800 on June 28, 2017, 09:42:27 AM

Title: NHD-0240A2 Can't write to location 30 in either row
Post by: RS3800 on June 28, 2017, 09:42:27 AM
I have a 2 row 40 character display and I don't know what's going on here but I can't write a single character to location 30 in either row 1 or 2 addresses 9F & DF.  I can write strings of characters but not one character at a time to those locations.  I can write single characters to other addresses but not those two.  I have another NH display that I tried and I have the same problem with that display also.

Any Ideas, Thank You
Title: Re: NHD-0240A2 Can't write to location 30 in either row
Post by: Saurabh_B on June 28, 2017, 11:31:56 AM
Would it be possible to get a picture of your display and the code you are using?

I would like to see if we can recreate the same problem.
Title: Re: NHD-0240A2 Can't write to location 30 in either row
Post by: RS3800 on June 28, 2017, 02:59:29 PM
Here is the photo.  The problem is the character after the #4 in the row 2.  I found this problem while testing.

I am trying to make the characters (b thru h) in row 1 change from upper & lower case if an input is active or not.

Title: Re: NHD-0240A2 Can't write to location 30 in either row
Post by: RS3800 on June 28, 2017, 03:17:06 PM
This code is not complete!  There are parts of it that are not being used.

The LCD section is run from CALLs on page 3

The problem I am Having is on page 6, LCD_Upper & LCD_Lower address DF or row 1 address 9F.  If I use any other addresses it will work.

Title: Re: NHD-0240A2 Can't write to location 30 in either row
Post by: RS3800 on July 05, 2017, 10:42:02 AM
[Solved] I couldn't figure out why only certain parts of the display acted up and others did not.

So, here is what I did.  I bought a display from a different manufacturer and that was worse yet!  Then I knew it had to be something in my code.  The first thing I did was slow the clock speed down to 500 kHz and then it worked fine so I went up to 1MHz and the problems came back  Then I knew it was timing.  I added time delays in until I found one the solved the problem and I found it in my E pulse.  I had one NOP in there and that wasn't enough, I tried 3 NOPs and still that wasn't enough.  To make a long story short I finally got it to 5ms and every thing was ok after that.

I never got any suggestions so maybe I was not the only one that was stumped.
Title: Re: NHD-0240A2 Can't write to location 30 in either row
Post by: Paul_B on August 11, 2017, 04:10:50 PM
Glad to hear you got your display up and running!

Thanks for sharing your solution, it will definitely help others  :D