Hi,
I
Line scrolling and wrapping
Hi Jens,
Thank you for posting on the forum.
When you enable the auto line wrap command, your text will print and wrap from row 1, 2, 3, and 4. If auto line wrap is off, the text will print and wrap from line 1, 3, 2, 4. If you have auto scroll on, once all the text reaches the end of the display, it will push all the other text above up, so you will be get a partially blank row, depending on how much text is being sent. If auto scroll is off, then the text will wrap back to the top row.
I hope this clarifys things for you.
Best Regards,
Thank you for posting on the forum.
When you enable the auto line wrap command, your text will print and wrap from row 1, 2, 3, and 4. If auto line wrap is off, the text will print and wrap from line 1, 3, 2, 4. If you have auto scroll on, once all the text reaches the end of the display, it will push all the other text above up, so you will be get a partially blank row, depending on how much text is being sent. If auto scroll is off, then the text will wrap back to the top row.
I hope this clarifys things for you.
Best Regards,
Hi Tom.
I was confused by the effect of the NEWLINE. I'm using the displays under Linux, addressing them directly via the /dev/ttyS* driver (serial line). So on the command line I had to enter RETURN key to transmit the string to the display (this is also a way to flush the internal buffers of the OS). Without NEWLINE it worked like expected. So I have to send the strings without NEWLINE at the end, each line adjusted to 20 characters, OK?
Here are my two examples, maybe it helps other people.
Thank you very much,
Jens
Line wrap example
Line scroll example
I was confused by the effect of the NEWLINE. I'm using the displays under Linux, addressing them directly via the /dev/ttyS* driver (serial line). So on the command line I had to enter RETURN key to transmit the string to the display (this is also a way to flush the internal buffers of the OS). Without NEWLINE it worked like expected. So I have to send the strings without NEWLINE at the end, each line adjusted to 20 characters, OK?
Here are my two examples, maybe it helps other people.
Thank you very much,
Jens
Line wrap example
Code: Select all
#!/usr/bin/perl -w
open(LCD,">/dev/ttyS3")||die "ERROR: can not write to /dev/ttyS..\n";
print LCD chr(0xFE),"X"; # clear the display
print LCD chr(254),chr(67); # wrap on
# print LCD chr(254),chr(68); # wrap off
print LCD "abcdefghijklmnopqrstuvwxyz";
close LCD;
Line scroll example
Code: Select all
#!/usr/bin/perl -w
open(LCD,">/dev/ttyS0")||die "ERROR: can not write to /dev/ttyS..\n";
print LCD chr(0xFE),"X"; # clear the display
print LCD chr(254),chr(81); # scroll on
# print LCD chr(254),chr(82); # scroll off
print LCD "line1 ";
print LCD "line2 ";
print LCD "line3 ";
print LCD "line4 ";
print LCD "line5 ";
close LCD;