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.

Problem with the RTCC values in PIC24f

Status
Not open for further replies.

urakhai911

Newbie level 6
Joined
Apr 15, 2010
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,413
Hi Forum,

I am working on a project where I need an accurate real time clock. At the moment, I have my PIC24f's RTCC configured to cause an alarm at one second intervals and display the time on my computer screen through UART. It is using the internal Low Power RC Oscillator to work.

The alarm generates an interrupt every second and displays the time on the monitor as it should. However, the values which the RTCC displays jumps by a value of seven. For example, every time it reaches the 9th second of a minute, it jumps to the 16th second. When it reaches 57, it jumps to 64. It then goes all the way to 90 seconds and then overflows and increments the minute count. This happens consistently.

Has anyone else had this weird problem and does anyone know a solution? (other than using a secondary oscillator instead of the internal one, I can't do that at the moment)

-Urakhai
 

Re: Pic24f rtcc

Apparently, you didn't realize that the PIC24 RTCC - to be compatible with popular RTC chips - is using BCD number representation in the time and date registers. You are reading the BCD numbers as binary which gives the above posted results. Decode as BCD, and everything is correct.

Consult the datasheet!
 
Re: Pic24f rtcc

Excellent, Thank you very much!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top