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 support@ccsinfo.com

How to scroll my character string on LCD 2X8

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



Joined: 21 Sep 2010
Posts: 159

View user's profile Send private message

How to scroll my character string on LCD 2X8
PostPosted: Fri Jul 25, 2014 11:41 am     Reply with quote

Hy
I have code working but I must put long characters string on small LCD 2X8 on single row.
I try to find this treat but it isn't "scroll".
so code:
Code:
      LCD_DATA_3=0;                    //ccaracter is first on first row
      printf(LCD_SEND_C,"abcdefgh ij%2u",78);
      LCD_DATA_3=64;                  ////character is first on second row
      printf(LCD_SEND_C,"xxx");


I want my display to show:
t=0;
abcdefgh
xxx

t+1secounds
bcdefgh
xxx

t+2secounds
cdefgh i
xxx

t+3secounds
defgh ij
xxx

...

t+5secounds
fgh ij78
xxx

somebody can give me idea? how to scroll this?
Best regards.
Ttelmah



Joined: 11 Mar 2010
Posts: 19238

View user's profile Send private message

PostPosted: Fri Jul 25, 2014 1:53 pm     Reply with quote

sprintf the whole thing to a string.

Then print from this, starting at a location that you move forward on each update.

A search here will give code examples. Scrolling displays have been discussed many times in the past.
nailuy



Joined: 21 Sep 2010
Posts: 159

View user's profile Send private message

PostPosted: Fri Jul 25, 2014 2:13 pm     Reply with quote

sprintf
might be solution I'll test this
thank you
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