6
\$\begingroup\$

In LCD Display, I want to SCROLL only one line in and Second line will be constant. I am using 0x1E command but the entire display will move.What commands is using for scrolling one line?
I am using ARM7 LPC1114X301 microcontroller and LCD is JHD162A.

\$\endgroup\$
4
\$\begingroup\$

The HD44780 LCD driver considers the display as 80 contiguous characters; it's not aware of the concept "character lines". A 16x2 display is for the HD44780 the same as a 32x1 display.

So no, you can't scroll one line and leave the other one static. You'll have to rewrite the whole display contents.

edit
Good point by Myforwik: in that 80 character string the characters shown in line 1 and 2 may not be contiguous. The first line will often be 40 characters, with for instance 16 visible, and then the second line will start at the 41st character.

\$\endgroup\$
  • \$\begingroup\$ And to make it worse, the 'lines' can be any part of the linear string. Most 4 line displays go from first line to third line then back to second line... Some 2x16 displays are actually 2x20 with 4 non visible, which confuses people into thinking there must be two lines. \$\endgroup\$ – Myforwik Sep 7 '12 at 12:13
  • 1
    \$\begingroup\$ I'm pretty sure that the display is aware of the concept of "character lines", in that it effectively regards the display as 40 two-character-high chunks, such that when scrolling the last character of the first line will be followed by the first character of the first line, and the last character of the second line will be followed by the last character of the second line, though I've basically never used the scrolling feature in a real application so it's possible I'm mistaken. If there were a means of setting the scroll position absolutely to anything other than zero (probably via... \$\endgroup\$ – supercat Sep 11 '12 at 14:47
  • 1
    \$\begingroup\$ ...1.6ms command which would scroll so the cursor would be at the left edge of the screen) that would be useful, but the facts that scrolling by 16 characters would take as long as setting the cursor position and writing 15 characters, and that there would be no way to detect if the display scrolling got out of sync with processor expectations, make it pretty useless in many cases. I wonder what percentage of installed displays are ever deliberately used in scrolling mode? \$\endgroup\$ – supercat Sep 11 '12 at 14:51
2
\$\begingroup\$

There is no such thing. There is left shift and right shift of all lines or cursor only.

\$\endgroup\$
0
\$\begingroup\$

There is Command to shift entire LCD content (0x1C) but not for One line. You have to do it manually:

  1. Print char (row,column)
  2. Add some delay
  3. Clear Display
  4. Print char (row,column+1)
\$\endgroup\$
-1
\$\begingroup\$

You could make manual scrolling on your own, so when scrolling function is called (in regular intervals) it displays just visible part of a big scrolling message, and shifts position of the first visible character (also providing illusion of continous string all the way round).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.