Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - RTC D1307

(you are viewing a thread; or go back to list of threads)

RTC D1307 (by hasan)
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.
Mon Feb 28 2011, 04:22:58, download attachment clock-example.ld
RTC D1307 (by Eduardo Schramm)
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:)
Sat Mar 5 2011, 18:25:44
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):