Just a short reminder post on how to get and set RTC. The RTC is powered by VBatt pin and keeps the RTC ticking with the time after you set it once. After you set it, then just read the time on boot and set the system clock.
private static DateTime SetDateTimeFromRTC() { // RealTimeClock.SetTime(new DateTime(2011, 4, 22, 1, 1, 1, 0)); // Set once to set the RTC. DateTime dt = RealTimeClock.GetTime(); // Get RTC time. Utility.SetLocalTime(dt); // Set system clock. return dt; }
Advertisements
William,
If possible, could you contact me? I have some questions about some of your older code. Thanks!
palsor at yahoo dot com
– Andy