I have an LK202-25 2X20 display, version 5.7. I am using the serial port connected to a PIC board I designed. If the display is cleared first, the following code should display a character in the upper left corner, move back and overwrite it, repeatedy from A-Z. After the 20th character, however, the display moves to the next line as if I had reached the end of the current line. After the next 20 characters, it scrolls the display up, etc. The position should still be at the beginning because of the "move cursor back" command after each character. It seems that the display doesn't decrement its character position when the "move cursor back" command is given. Can any one explain?
char c;
while(1) {
for(c='A';c<='Z';c++) {
DelayMs(200); /* Delay 200 milliseconds to see what is happening */
lcd_write(c); /* this is a function that sends a char out serial port */
lcd_write(0xFE); /* Send the MOVE CURSOR BACK command */
lcd_write('L');
}
}
MOVE CURSOR BACK causes linefeed after 20 uses
Hi Ktrussell,
Unfortunately, there is a known bug in all the alphanumeric units regarding the move cursor back command, and it's control character equivalent. We expect to make a product wide switch in the future once code space becomes available, however, at this time, you'll have to work around it.
I tried out your algorithm using the return home command, 'H', which moved the cursor to the top left without any scrolling problems. I suspect the extended move cursor command, with a position specified, will similarly help you avoid the scrolling issue.
Again, I apologize for the inconvenience, and will be happy to answer any further questions you may have regarding this issue.
Thanks,
~Troy
Unfortunately, there is a known bug in all the alphanumeric units regarding the move cursor back command, and it's control character equivalent. We expect to make a product wide switch in the future once code space becomes available, however, at this time, you'll have to work around it.
I tried out your algorithm using the return home command, 'H', which moved the cursor to the top left without any scrolling problems. I suspect the extended move cursor command, with a position specified, will similarly help you avoid the scrolling issue.
Again, I apologize for the inconvenience, and will be happy to answer any further questions you may have regarding this issue.
Thanks,
~Troy
Troy Clark
Design & Development
Matrix Orbital
Design & Development
Matrix Orbital