Hi,
1. Do we have to manually set daay of month, day of week, day of year etc. in
the on chip RTC of LPC2148?
2. Will the RTC take care of the last date of each month(28,29,30,31) or do we
have a logic in our code to handle it?
thanks,
Subhash
setting time in RTC, LPC2148
Started by ●April 18, 2014
Reply by ●April 23, 20142014-04-23
s...@gmail.com wrote:
> Hi,
>
> 1. Do we have to manually set daay of month, day of week, day of year
> etc. in the on chip RTC of LPC2148?
> 2. Will the RTC take care of the last date of each month(28,29,30,31)
> or do we have a logic in our code to handle it?
You have to set day of month, and day of week (i.e. 0=Sunday, 1=Monday, 2=Tuesday etc).
I don't remember there being a "day of year" register?
If you have set the month and year correctly, RTC takes care of month length, including leap years. You do not need to do that yourself.
--
Tim Mitchell
> Hi,
>
> 1. Do we have to manually set daay of month, day of week, day of year
> etc. in the on chip RTC of LPC2148?
> 2. Will the RTC take care of the last date of each month(28,29,30,31)
> or do we have a logic in our code to handle it?
You have to set day of month, and day of week (i.e. 0=Sunday, 1=Monday, 2=Tuesday etc).
I don't remember there being a "day of year" register?
If you have set the month and year correctly, RTC takes care of month length, including leap years. You do not need to do that yourself.
--
Tim Mitchell