If you can buy a ds1302 RTC I can provide you with a working program and a schematic. I know it isn't a 1307, but those are the options I can provide.
Travin
If you can buy a ds1302 RTC I can provide you with a working program and a schematic. I know it isn't a 1307, but those are the options I can provide.
Travin
++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++Originally Posted by Travin77
I do not care about the IC, i can buy DS1302 as long as it gives the same result.
i just need to deal with time in a certain way (multiply, divide...etc) so the IC will not cause a prob at all... do you have a program for PIC16F876A? i'll be more than thankful!!!
Eng4444 please understand that folks don't sit next to their terminals all day long waiting to answer your questions. I might glance at it once a day if I'm at my desk - sometimes more, or I might not for several days at a time... Time may be of the essence for you but I also have other priorities in my life...
If you are calculating Energy = Power . Time, then you are about to open up a whole heap of time calculation problems if you are going to read the time and date, because as you move through midnight into the next day, or increment through into the next month, you have to take into account a whole new set of figures...
Example... What is the elapsed time between 14:37:31 on 25/02/06 and 17:11:09 on 26/05/06? That's a whole heap of code to do that. You have to work out how much time elapsed until midnight on one day, and how much time elapsed since midnight on the next. Then a month goes by... and you have to take account how many days have elaspsed. And was this year a Leap Year? If you get it wrong you're a day out... So unless you convert everything to Linear Time (there was a long thread on Julian Date calculation some time ago) you have a headache with a PIC full of lots of code doing no more than calculating an elapsed period.
The DS1307 however provides you with an easier solution that saves you having to do these Time and Date calculations... just count Seconds. Set up the DS1307 to output a Second Pulse to your PIC, and your program sits there doing whatever you want it to do and just simply incrementing a counter every time a Second ticks by.
Melanie
Isn't there a different chip in the DSxx series that just records the launch date and then counts elapsed seconds? - can't recall the part # off-hand.
Arch
Maybe you can come up with a new solution for my problem?
i really do not need about making it work for a year or month... not even a week or a full day!
i just want to do a demonstration for 30 minutes and i need to show people who a watching the final number.
so what do you say if i take a second small PIC (12F675 OR 16F84) and run a loop inside it? and then, i take the final number as if it is number of seconds and multiply by it by the Power in PIC16F876... what do you say or suggest?
would it be an accurate number of seconds?
but what to write in that loop? what delay to put.... ?
I hope You or anyone helps me in this affaire...
Maybe this is the best solution to work in peak times? i mean the usage of the second PIC...
any advice is appreciable.
Bookmarks