Looking for code / method to use as a count down timer to a specific date.
Before I start code on this, I was wanting to know if there is any SX/B code that can be used as a count down timer to a specific date like Christmas. It needs to be displayed in HH:MM:SS but I can take care of that. Algorythms or coding would help. I think this can be done with an SX48 or SX28 directly but if I need to add a DS1302 I will. Any help here?
Comments
We are on the hunt for a prewritten code for·the·SX driven Christmas Countdown display.
At minimum would be a days until Chirstmas and if the DS1307 chip handles dates we could compare the dates and calc the days until.
Since the DS1307 is I2C I may need to go with a DS chip that is serial unless we have enough pins and processor memory to do that I2C.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
You will not need to use a DS1307 or DS1302 with the current circuit. http://forums.parallax.com/showthread.php?p=853223
You can have variables for start secs, mins, hrs, days and variables for end secs, mins, hrs and days.
Do some math on them to find out the amount of secs, mins, hrs and days there are between them and just count down that much time till you get to 0 secs, 0 mins, 0 hrs and 0 days. It is a count down timer that is relative in time and not specific to a current time·to reference. Does this make sense?