RTC8563 library
Fork of RTC8563 by
Diff: RTC8563.cpp
- Revision:
- 1:385198587f4b
- Parent:
- 0:e7072e1b5fa5
--- a/RTC8563.cpp Thu Apr 16 10:34:46 2015 +0000 +++ b/RTC8563.cpp Wed Apr 22 19:42:05 2015 +0000 @@ -56,6 +56,18 @@ void RTC8563::rtc_init() { + rtc_write(CONTROL1, 0x20); //stop + rtc_write(CONTROL2, 0x00); + rtc_write(YEARS, 0x15); + rtc_write(MONTHS, 0x04); + rtc_write(DAYS, 0x22); + rtc_write(HOURS, 0x21); + rtc_write(MINUTES, 0x34); + rtc_write(SECONDS, 0x00); + rtc_write(WEEKDAYS, 0x02); + rtc_write(CLOCKOUT_FREQ, 0x00); // 0x83 = TE on & 1Hz + rtc_write(TIMER_CINTROL, 0x00); + rtc_write(CONTROL1, 0x00); //start } void RTC8563::rtc_alarm()