I need help with a LCD clock and text
Dc20
Posts: 4
Hello, im new at this forum.
I have to create a LCD clock and a text down the clock with a Parallax LCD and BS2 microcontroller, if anyone knows what could be the program in general to create a clock, and how can i put the clock on the LCD!!. Please i need help its very important now, i have the hardest homework on my class.
Thanks
I have to create a LCD clock and a text down the clock with a Parallax LCD and BS2 microcontroller, if anyone knows what could be the program in general to create a clock, and how can i put the clock on the LCD!!. Please i need help its very important now, i have the hardest homework on my class.
Thanks
Comments
I believe there is a Project in the Completed Projects Forum that uses the DS1302 and an LCD to create a clock. I would look there. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Once that is working the way you want it, you can experiment with timing. A clock like what you want continually goes through a cycle where it waits for a known time (maybe 1/10 of a second), then increments a counter. When the counter reaches 1 second, it sets the counter back to zero and increments a byte value used to hold the seconds. When that reaches 60, the program resets that to zero and increments a byte value used to hold the minutes. When that reaches 60, the program resets that to zero and increments a byte value used to hold the hours. When that reaches 24, the program resets that to zero. The program then sends the time values to the display. If you want an AM/PM type display, you check for the hour being 12 or greater. If so, you subtract 12 and send that and a PM to the display. If not, you send the hour and an AM to the display. If the hour is zero, you actually send a 12 to the display.
Note that the time it takes to do this checking and to send the data to the display takes some time by itself and you may have to adjust the next "wait" time to account for this. Think of this as part of your calibration process (checking your displayed time against a known standard).
Thanks
*Mike: im a novice, im doing this because its hard for me understanding microcontrollers, its the hardest subject that i have on the school, thanks for your advice.
Novices learn by doing. There's only so much you can learn by "understanding" without "doing". The worst that will happen is that your program won't work. If you start with an example from Parallax's documentation, you know you have something that worked. You make it work as well (by trying it), then modify it a bit at a time until you understand what you're using.
__________
|hh:mm PM|
| Text |
|_________|
Is the text fixed? Is that where you put some kind of status messages?