I am using a LCD MCUFriend, 3,5" 480x320 ILI9486 WITH Arduino Mega 2560
everything is working very well, but the function vertscroll, from lib MCUFRIEND, work fine in all samples, but when I try, is not working.
What I need: I have a text screen (like a DOS or LINUX), and when is in the last line, when I send '\n', then screen need to scroll up, and show a new blank line to enter more characters.
I see the many samples, about vertscroll, but i cant use, for 2 reasons:
this commando copy the first line, to last line after scroll, and i need a blank line, the firts line after scroll need to be lost, but this I can solve, using fillrect in the last line.
the command work, srcoll Up the screen, but after, scroll down. He not stay in the scroll up. I can not know if I am explaining right. Sorry
Like this:
for (uint16_t i = 1; i <= 16; i++)
{
tft.vertScroll(16, tft.height(), i); // Scroll 16 lline to UP
delay(10);
}
Vertical scroll is only a moving window onto fixed memory.
Take sheet of paper.
Write numbers 1 to 20 on the paper.
Sellotape the top to the bottom i.e. in a circle.
Then lay it flat on the table. You will see numbers 1 to 10.
Now roll it up a bit so you see numbers 2 to 11.
You are viewing a "window" onto the fixed memory i.e. the sheet of paper.
When you scroll up, you want to write on the bottom line. Rubbing out the previous contents.
With your roll of paper it is easy to see the relationship between logical print cursor i.e. your window and the physical print cursor i.e. position in fixed GRAM memory.
If you try to visualise without the paper roll, your head will hurt.
david_prentice:
Vertical scroll is only a moving window onto fixed memory.
Take sheet of paper.
Write numbers 1 to 20 on the paper.
Sellotape the top to the bottom i.e. in a circle.
Then lay it flat on the table. You will see numbers 1 to 10.
Now roll it up a bit so you see numbers 2 to 11.
You are viewing a "window" onto the fixed memory i.e. the sheet of paper.
When you scroll up, you want to write on the bottom line. Rubbing out the previous contents.
With your roll of paper it is easy to see the relationship between logical print cursor i.e. your window and the physical print cursor i.e. position in fixed GRAM memory.
If you try to visualise without the paper roll, your head will hurt.
David.
Thanks man, and I imagine llike this, but i cant realize this, in the code... all what i tried, same problem... unfortunate, to work what i need, i am using a old code, that do a scroll, software scroll, but a realy slow scroll...
Vertical Scroll is a hardware thing. i.e. vertical in Portrait but horizontal in Landscape.
That is what I demonstrate in graphictest_kbv.ino
If you want to scroll text in Landscape you need to buy a screen with native landscape-style geometry.
e.g. ILI9342 320x240, SSD1963 480x272, SSD1963 800x480
The Raio RA8875 can do hardware scrolling in different directions. But I do not support RA8875.
Engineering is about making the best use of the resources available.
So if you don't have a SSD1963 you need to design a different solution.
david_prentice:
Vertical Scroll is a hardware thing. i.e. vertical in Portrait but horizontal in Landscape.
That is what I demonstrate in graphictest_kbv.ino
Yes, i am studying this sample. And I a trying do understand him. Because I do the same thing, but continue doing portrait...