Demo Clock with Nucleo-F303RE and Starter Shield

Dependencies:   DS1307 TM1636 mbed

Files at this revision

API Documentation at this revision

Comitter:
rogerzuber
Date:
Thu May 03 07:55:09 2018 +0000
Parent:
1:dacca338a30b
Commit message:
M242 ClockBase

Changed in this revision

DS1307.lib Show annotated file Show diff for this revision Revisions of this file
TM1636.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/DS1307.lib	Thu May 18 08:31:33 2017 +0000
+++ b/DS1307.lib	Thu May 03 07:55:09 2018 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/users/rogerzuber/code/DS1307/#a60e31060229
+https://developer.mbed.org/users/rogerzuber/code/DS1307/#70224be5d68c
--- a/TM1636.lib	Thu May 18 08:31:33 2017 +0000
+++ b/TM1636.lib	Thu May 03 07:55:09 2018 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/users/rogerzuber/code/TM1636/#864e710889fa
+https://developer.mbed.org/users/rogerzuber/code/TM1636/#e4450fb0849a
--- a/main.cpp	Thu May 18 08:31:33 2017 +0000
+++ b/main.cpp	Thu May 03 07:55:09 2018 +0000
@@ -44,7 +44,7 @@
          
         if (!button_K1)
         {
-            test_rw(my1307.settime( 00, 00, 12, 3, 17, 5, 17));
+            test_rw(my1307.settime( 00, 35, 12, 3, 17, 5, 17));
             pc.printf("time is set to 12:00:00 - 17.05.2017\n\r");
             
             junk = 0x39;                                                // just a junk value do read and write test to DS1307 ram
@@ -58,23 +58,23 @@
             
             temp[0] = hours / 10;
             temp[1] = hours % 10;
-            temp[2] = min / 10;
-            temp[3] = min % 10;             
+            temp[2] = sec / 10;
+            temp[3] = sec % 10;                   
             tm1636.display(temp);       
-    
+        
             //junk = 0;                                                   // clear junk to show that when the register is read from the correct value is obtained
             //test_rw(my1307.read( 0x20, &junk));                         // this should read register 0x20
             //pc.printf("Value read from register 0x20 %.2X \n\r",junk);
         }
-//       if ((sec % 2 == 1))
-//        {
-//            tm1636.point(true);
-//        }
-//        else
-//        {
-//            tm1636.point(false);
-//        }
+        if ((sec % 2 == 1))
+        {
+            //tm1636.point(POINT_ON);
+        }
+        else
+        {
+            //tm1636.point(POINT_OFF);
+        } 
         wait(1.0);
         myled = ! myled;
     }
-}
\ No newline at end of file
+}