How do I program the DS1307 RTC with ldmicro.
I use PIC16F877A. and by reading hours using 7segmen led.
Mon Feb 28 2011, 03:13:04
(no subject)(by Jonathan Westhues)
There's generally no reason to use a separate RTC chip, unless e.g. you need to keep a sense of time while the main processor is shut down to reduce power consumption. You can code the clock yourself, as in the attachment.
If you keep time on the micro itself, then the tolerance of the micro's oscillator is important. A crystal should generally be good to within tens of ppm (about a second per day); but make sure the value of the tuning capacitors is correct, or it can be off by much more. This value will be determined from the crystal's datasheet, not the micro's; the tuning capacitors, plus the micro's input capacitance and the stray wiring capacitances, should equal the crystal's rated load capacitance.
I understand your question and agree with Mr. Westhues.
If you try to code PIC to read and write a DS1307 you'll burn all the memory you need to put your program.
So, do you know these very cheap chinese clocks? They're present all around the world and they have a precise time base driving a coil. Your project could be very very simple if you just use this time base driving a transistor and a simple input coil. You'll save space and time.
Regards:)