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

LCD 16x2 display multiple information at different intervals

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



Joined: 10 Aug 2016
Posts: 17

View user's profile Send private message

LCD 16x2 display multiple information at different intervals
PostPosted: Wed Aug 10, 2016 2:53 am     Reply with quote

Hello guys,
Please can someone help me with an idea of how to add pagination to my 16x2 LCD display where at a specific time interval, like say after every 3 seconds the display switches from page 1 to 2, 2 to 3 and back again to 1. Please someone help (without using delay_ms() function).
Thanks
Ttelmah



Joined: 11 Mar 2010
Posts: 19541

View user's profile Send private message

PostPosted: Wed Aug 10, 2016 4:18 am     Reply with quote

Use a timer interrupt.

Have it increment/decrement a variable at an interval. Use this as the control to a 'state machine' in your main code, changing what is on the display.
IamUche



Joined: 10 Aug 2016
Posts: 17

View user's profile Send private message

PostPosted: Wed Aug 10, 2016 4:29 am     Reply with quote

@Ttelmah: thanks, I really appreciate. I think I get your concept but seriously the ideology of "state machine" confuse me a lot. Severally I tried reading it up but I don't seem to grasp the concept fully. Can you help me with that? Thanks
IamUche



Joined: 10 Aug 2016
Posts: 17

View user's profile Send private message

PostPosted: Fri Aug 12, 2016 12:52 am     Reply with quote

Don't worry, I already figured it out with your guide, my LCD is behaving as expected. Thanks alot.
Ttelmah



Joined: 11 Mar 2010
Posts: 19541

View user's profile Send private message

PostPosted: Fri Aug 12, 2016 1:10 am     Reply with quote

Well done.

It's a powerful 'way of thinking' for a lot of jobs, so now you have another tool 'in the toolbox'. Smile
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