0

I am using a 32.768Khz sec oscillator with the PIC24fj64ga002 to make use of the RTCC of the PIC. So far my RTCC code is working but I am not able to get my oscillator to work properly. I used an alarm of 1 minute to toggle an led using RTCC but I am getting the RTCC interrupt at around 13sec and thus some error. For the secondary oscillator I have connected it in the required pins of the PIC and enabled it using " OSCCONbits.SOSCEN=1;". Do I need to do anything more to make the sec oscillator to work. I checked the oscillator using a logic analyser but I am not getting any signals. But my led does toggle though the interval when set for 1 minute is giving me only 13 seconds. Even when I test my RTCC code the seconds and minuted seems to be updating at a far greater pace. Please tell me if I should paste my RTCC code. Do tell me if I need to make any changes for setting the Sec oscillator other than the one I had mentioned.

  • You might try to create a [MCVE](http://stackoverflow.com/help/mcve) and adding that to your question. – Damien_The_Unbeliever Feb 27 '15 at 07:40
  • Also, if you edit your question to include a MCVE, you might also want to consider the presentation in general. White space helps a lot (at the moment, it's just a wall of text), as does marking code blocks (use the `{}` tool) and look at the preview. – Damien_The_Unbeliever Feb 27 '15 at 07:48

0 Answers0