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.

4

0 回答 0