I want to count minutes for the hole day
·Hi Every One
I need a way to have a counter that is time·base on the DS1302 that i count to 65535 secs
Can any one help i have try a couple ways to do it but no luck
counter = counter + 1
I kown this·will work ........>>>>>>>>· counter = counter + 1
........>>>>>>>>>>>>>>· but how do i use the DS1302 Time Chip·as my pulse...........>>>>>>>>>>>>>>
...............>>>>>>>>>>>>>>>··· Count = DS1302 + 1
and be able to use the count to turn thing·ON and OFF
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·that you may have and all of your time finding them
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 3/10/2008 4:31:08 AM GMT
I need a way to have a counter that is time·base on the DS1302 that i count to 65535 secs
Can any one help i have try a couple ways to do it but no luck
counter = counter + 1
I kown this·will work ........>>>>>>>>· counter = counter + 1
........>>>>>>>>>>>>>>· but how do i use the DS1302 Time Chip·as my pulse...........>>>>>>>>>>>>>>
...............>>>>>>>>>>>>>>>··· Count = DS1302 + 1
and be able to use the count to turn thing·ON and OFF
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
![idea.gif](http://forums.parallax.com/images/smilies/idea.gif)
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 3/10/2008 4:31:08 AM GMT
Comments
If you're wondering how to do the time arithmetic ... it's just the same way you would do it on paper.
Thank You for your Reply
The only thing that i came up with was this
some code before this
IF secs = $59 THEN
PAUSE 1000
counter = counter + 1
return
I thought that there may have a simpler way to do this
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
Please try what I've suggested. If you don't understand it, please ask some specific questions until you do.
It's not as helpful to say "the only thing that I came up with" as it would be to say "I thought this ... and wrote this because I thought it would do that" or "I tried this ... and this is what happened".
You will also need to experiment. Try out program fragments (using DEBUG and DEBUGIN) until you understand them and until they work the way you expect them to work. That way you will have a library of tested and understood fragments and subroutines that you can use for other tasks.
Thanks· for trying to help me
I am just looking for a way to·count just minutes for the hole day
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
If you don't actually need the time and date and just want the elapsed time, you can
set the time in the DS1302 to zero when your device is started, then read the time
from the DS1302 when you're done and it already has the elapsed time in seconds,
minutes, and hours. If you want the elapsed time in minutes, you should be able to
compute that given the minutes and hours.
The reason that i want to just use the minutes is because i want to use a look up table and i want to keep it simple
I know some where a while back some·one·used it that way and i can not find·it in Google Search·or in the forum search
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam