CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Single line text scrolling on LCD ?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
leaveme



Joined: 24 Nov 2010
Posts: 19

View user's profile Send private message

Single line text scrolling on LCD ?
PostPosted: Sat Dec 10, 2011 10:48 pm     Reply with quote

I'm using following code for left/right text scrolling. But they are handling both the lines at the same time. Anybody can suggest anything so that I can scroll only single line ?

Code:
lcd_send_byte(0, 0x1E);
lcd_send_byte(0, 0x18);


Thank you.
temtronic



Joined: 01 Jul 2010
Posts: 9228
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Dec 11, 2011 7:32 am     Reply with quote

Easy to do...

First create 2 16 byte 'buffers'(arrays) and copy the text you want to scroll from your program to the first .
Second, copy the data from the first buffer to the second,offsetting the indices(pointers).
Now move the data from the 2nd buffer to the LCD.

to scroll left to right..
outputbuffer[2]=inputbuffer[1].

to scroll right to left
ouputbuffer[2]=inputbuffer[3].

if you want the message to 'loop' around, copy [0] to [15] !


..actual code is up to you to do.

If you try it on graphpaper, it'll be easy to visualize the 'flow' of the code.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group