setting time in RTC, LPC2148

Started by subh...@gmail.com April 18, 2014
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

An Engineer's Guide to the LPC2100 Series

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