We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, Does anyone have C example code on how to use the RTC module? Thanks
Now I understand better. Unfortunately I use the C167CS which is different than the XC167. As we are using different processors, I don't think I can help you. Are you sure that you are writing to the RTC_CON register? Try writing to the RTC_CON register last, after the write to RTC_IC_IE. In your init routine, call the RtcSetTime routine to set a time. Set a non-zero time. When you call RtcGetTime you should at the very least see the non-zero time. Sorry that I couldn't help. If you figure it out, perhaps you could post the solution here.