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.

Inaccuracy of PIC Microcontroller RTC

Status
Not open for further replies.

Rikr09

Member level 3
Joined
Feb 14, 2013
Messages
59
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,745
Reference previous thread:

https://www.edaboard.com/threads/188226/

I had a similar problem with a PIC18F46J11 which lost several seconds every minute. The crystal WAS running at 32768Hz exactly as intended. I don't know if the same applies to your PIC24 device because you haven't told us which one it is, check you are using the crystal oscillator as your timing source. Everything seemed to work properly, including the alarm registers but just a little too slow. The problem was one bit in one register which was making the RTC module derive it's source from the internal slow clock. Unfortunately, it runs at 31KHz not 32.768KHz !! Being so close in frequency it's easy to be misled about the problem.

Brian.

So, you can fix the problem?
 

Gorgon

Full Member level 6
Joined
Nov 10, 2005
Messages
345
Helped
75
Reputation
150
Reaction score
67
Trophy points
1,308
Location
Norway
Activity points
3,642
Switch the clock source to the x-tal oscillator, and not the internal RC-oscillator. It's in the quoted text!
 

Rikr09

Member level 3
Joined
Feb 14, 2013
Messages
59
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,745
Switch the clock source to the x-tal oscillator, and not the internal RC-oscillator. It's in the quoted text!

Hello Gorgon,

I am using a PIC24FJ128GB204 and i do no have clear how to select exactly the SOSC to my RTC. Just enabling SOSCEN bit?

Thanks for your help!
 

Rikr09

Member level 3
Joined
Feb 14, 2013
Messages
59
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,745

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top