Page 1 of 1

How can i scroll?

Posted: Tue Oct 27, 2009 4:31 pm
by fresh
Hi guys,
in a LCD 2x16 Display i want to scroll a Message only in one direction.
If the Message out of the Display, then the message start again at 0,0.
I can't find a solution for this plan.
I don't understand the LCD "Scroll-Makro" only, when I change the direction.

Can anybody help me with this Problem, please.

Regards Andreas

Re: How can i scroll?

Posted: Tue Oct 27, 2009 4:37 pm
by medelec35
That question was answered here:
http://www.matrixmultimedia.com/mmforum ... f=5&t=6643
To help understand just step through posted example, and look at the variable values.

Hope it helps.

Re: How can i scroll?

Posted: Wed Oct 28, 2009 6:40 am
by fresh
Hello medelec,
thank you for the link.
This link help a litle bit, but i want to scroll a message from left to right.
If the message scroll out of the display, then the message start again at 0,0.
I clear the Display and set the variable to default, but the message no displayed
and scroll again.

Regards Andreas

Re: How can i scroll?

Posted: Wed Oct 28, 2009 7:00 am
by medelec35
Your welcome.
Flowcode posted was to give to idea of how scroll function works, i.e a starting guide. It won't cover every scenario
What you want to achieve won't be that much different, just leave the part that scrolls to the right. You could also use a string length function so number places message requires scrolling before message is scrolled of the end can be determined.
So you want to start at the left, scroll to the right, message disappears out at the right then back in at the left etc. Is that correct?

Re: How can i scroll?

Posted: Wed Oct 28, 2009 7:25 am
by fresh
Hello medelec,
thank you for help and sorry for my english. :oops:
My message to display are 26types long.
Yes it is correct,
I will start at 0,0 (left side) than scroll right, the message disappears out at the right
and then it starts again in the left side. Than agin and again....

Re: How can i scroll?

Posted: Wed Oct 28, 2009 2:26 pm
by medelec35
Try this.
To work on hardware, you will need to select your own target device, and enter your own config values via Chip menu, or programmer etc.

Re: How can i scroll?

Posted: Wed Oct 28, 2009 4:38 pm
by medelec35
one thing you will have to change is string length from default 20 to 26. I forgot to do that on posted file.

Re: How can i scroll?

Posted: Wed Oct 28, 2009 6:23 pm
by medelec35
Try this one.
I have changed it, so does not start with whole word on display at the beginning.This is probably more what you are after? Personally I would scroll from right to left, but that is your choice. But to look right the message has to be typed in reverse. e.g "here! message your"
At least now you have the choice of which one you like best.

Re: How can i scroll?

Posted: Thu Oct 29, 2009 6:11 am
by fresh
Thank you very much for your help medelec.
That is it.

Regards Andreas

Re: How can i scroll?

Posted: Thu Oct 29, 2009 7:02 am
by medelec35
Your welcome. Glad I can help.
This one Scrolls from right to left. That way you don't have to type your message in reverse!
So you see :
y
yo
you
your
your m
your me
your mes
etc.
Instead of
!
e!
ge!
age!
sage!
That way you see the first word first, and not the last world first. Hope I have made that clear enough?

Re: How can i scroll?

Posted: Fri Oct 30, 2009 6:54 am
by fresh
Hello medelec,
thank you for the example files.
Now I understand the makros and can finish my project.
You are the Best. Thank you for help .

Re: How can i scroll?

Posted: Fri Oct 30, 2009 12:08 pm
by medelec35
No problem. Just glad yor sorted now. Looking and following examples is helps to understand functions better.

BTW with the last two examples, It dose not matter how may characters are within the message string (1 to 26), as the last character disappears the on one side of LCD display ,the first character will appear on the other side of dispay.