Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: PCF8583_rtc mbed
Revision 3:07c00c82338c, committed 2014-02-25
- Comitter:
- dennyem
- Date:
- Tue Feb 25 23:42:26 2014 +0000
- Parent:
- 2:4184f92440a1
- Commit message:
- Added configureControlReg() to main()
Changed in this revision
| PCF8583_rtc.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/PCF8583_rtc.lib Sun Feb 23 21:28:26 2014 +0000 +++ b/PCF8583_rtc.lib Tue Feb 25 23:42:26 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/dennyem/code/PCF8583_rtc/#eaba89d6e5d8 +http://mbed.org/users/dennyem/code/PCF8583_rtc/#3291c1f0b986
--- a/main.cpp Sun Feb 23 21:28:26 2014 +0000
+++ b/main.cpp Tue Feb 25 23:42:26 2014 +0000
@@ -29,12 +29,13 @@
i2c.frequency(400000);
-// dtr = rtc.read(TIME); //Set the clock from scratch
-// dtr.time.hours = rtc.bin2bcd(9);
-// dtr.time.minutes = rtc.bin2bcd(18);
-// rtc.write(TIME, dtr);
-// wait(.1);
-
+/* rtc.configureControlReg(0);
+ dtr = rtc.read(TIME); //Set the clock from scratch
+ dtr.time.hours = rtc.bin2bcd(8);
+ dtr.time.minutes = rtc.bin2bcd(22);
+ rtc.write(TIME, dtr);
+ wait(.1);
+*/
while(1) {
dtr = rtc.read(TIME);
i2c.write(ADDR_8574_1, &dtr.time.hours, 1);