Author Topic: Skipping a line  (Read 953 times)

greanie

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Skipping a line
« on: December 06, 2016, 05:35:31 PM »
I am using an NHD-0420D3Z-FL-GBW-V3 and am able to print characters on the LCD.  I set the cursor to home, then I print more characters than can fit on one line.  The next character, the 21st  character, shows up on line 3, not line 2 as I expect.  What am I doing wrong?

Also, how do I jump to the next line?  \n prints as a funny character, not a carriage return.

Thanks!

Ted_M

  • Administrator
  • Newbie
  • *****
  • Posts: 8
  • Karma: 1
    • View Profile
Re: Skipping a line
« Reply #1 on: December 07, 2016, 08:34:58 AM »
Writing a string of characters to this display will first fill line 1, then move to line 3, followed by line 2 and lastly fill line 4.

To set the cursor at line 2 after you fill line 1 with characters, use the Set Cursor Command "0xFE 0x45" with "0x40" to position the cursor at the beginning of line 2.

See the Command description on page 9 in the datasheet for further details:

http://www.newhavendisplay.com/specs/NHD-0420D3Z-FL-GBW-V3.pdf

greanie

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Skipping a line
« Reply #2 on: December 07, 2016, 12:32:38 PM »
Thank you for the explanation.  I looked for that kind of information in the manual but didn't find it.  I found the behaviour counter intuitive but now I know that it is the default.

 

NHD-C0220Biz-FSW adds character 0x11 at begining of line

Started by whAtlGaBoard Character LCDs

Replies: 3
Views: 1447
Last post July 11, 2016, 08:20:40 AM
by Saurabh_B
Our 1st line of SLIM character OLEDs have arrived.

Started by Bridgette_EBoard New Product Releases

Replies: 2
Views: 4520
Last post February 12, 2015, 03:32:56 PM
by Bridgette_E
NHD-C0216CZ-FSW-FBW Serial Interface RS line question

Started by joestaudtBoard Character LCDs

Replies: 4
Views: 3024
Last post May 11, 2015, 09:34:29 AM
by Michael_L
New additions to our 2.4" TFT display line

Started by Bridgette_EBoard New Product Releases

Replies: 0
Views: 3314
Last post December 29, 2014, 12:08:26 PM
by Bridgette_E
NHD0420CW-A*3 tHREE LINE MODE, MIDDLE LINE DOUBLE HEIGHT

Started by wb2dybBoard OLEDs

Replies: 3
Views: 3117
Last post July 01, 2015, 09:49:46 AM
by Paul_B