This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTC example for XC167

Hi,

Does anyone have C example code on how to use the RTC module?
Thanks

Parents
  • 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.

Reply
  • 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.

Children
No data