Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

why real time clock with crystal is not accurate

Status
Not open for further replies.

polona1010

Member level 1
Member level 1
Joined
Apr 17, 2013
Messages
40
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,524
Why microcontroller clock is not accurate even with crystal, and why DS1307 is ok?

Why microchip and atmel dont implement RTC facility in microcontroller?
 

Hi,

When you say crystal, are you refering to the main oscillator crystal or a 32khz used with Timer1 ?

When you say not accurate, what time variations are you experiencing and what circuitry are you using ?

Also its may sound silly, but what are you using to time it with, had one guy saying his pic timing was out but he was using his PCs clock, not a proper stopwatch.

Micropchip do implement rtc on some of the more advanced chips
 

Hi,

So you are using your main oscillator as the basis for a software rtc.

Assuming your hardware is good, correct capacitors etc, no details provided, then it must be a fault in your program code.

Post your code so we can see how you have done it, a hardware diagram might be useful.

Also look at this software rtc https://www.romanblack.com/one_sec.htm
 

I guess it's either a bad crystal oscillator circuit or bad code. A standard tolerance that can be easily achieved by a µP crystal oscillator is 50 - 100 ppm, corresponding to 4 - 9 seconds/day. Capacitors must be chosen according to crystal specification, however. The deviation accumulates to 0.5 - 1 hour/year, still quite a lot for a watch.

A serious reason to use a separate RTC chip is power consumption. You'll hardly achieve 0.2 - 0.5 µA with a built-in µP RTC.
 
  • Like
Reactions: tpetar

    tpetar

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top