View previous topic :: View next topic |
Author |
Message |
IamUche
Joined: 10 Aug 2016 Posts: 17
|
LCD 16x2 display multiple information at different intervals |
Posted: Wed Aug 10, 2016 2:53 am |
|
|
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: 19515
|
|
Posted: Wed Aug 10, 2016 4:18 am |
|
|
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
|
|
Posted: Wed Aug 10, 2016 4:29 am |
|
|
@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
|
|
Posted: Fri Aug 12, 2016 12:52 am |
|
|
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: 19515
|
|
Posted: Fri Aug 12, 2016 1:10 am |
|
|
Well done.
It's a powerful 'way of thinking' for a lot of jobs, so now you have another tool 'in the toolbox'. |
|
|
|