2 Replies Latest reply on Jul 15, 2015 9:40 AM by user_242978793

    How to use the RTC component

    user_242978793

      How to you use the RTC_ConvertDecToBCD(uint32 decNum) command when using the RTC component?  I am trying to set the time of the RTC from terminal inputs.  I have 32 byte hour minutes and Seconds and I am trying to use this equation .  New_Time = ((uint32)(Hour << HR_OFFSET)| \
                              (uint32)(Min << M_OFFSET)| \
                              Sec);

         

       RTC_SetDateAndTime(RTC_ConvertDecToBCD(New_Time),DATE_MONTH_DAY_YEAR);  It works but he RTC get binary time and Minutes instead of decimals

         

       

         

      Thanks

         

      BobGoar