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: FreescaleIAP SimpleDMA eeprom mbed-rtos mbed
Fork of CDMS_QM_03MAR2017_Flash_with_obsrs by
Diff: cdms_rtc.h
- Revision:
- 245:da9d1bd999da
- Parent:
- 224:3ac1f91e0ebc
- Child:
- 255:642ea552ac77
diff -r 29625f5fc745 -r da9d1bd999da cdms_rtc.h
--- a/cdms_rtc.h Sat Jul 09 13:11:25 2016 +0000
+++ b/cdms_rtc.h Sun Jul 10 13:47:26 2016 +0000
@@ -40,22 +40,22 @@
gCS_RTC=0;
spi.write(0x80);
- spi.write(0x01); // set milliseconds value to 00
+ spi.write(0x00); // set milliseconds value to 00
gCS_RTC=1;
gCS_RTC=0;
spi.write(0x81);
- spi.write(0x01); //set seconds value to 00
+ spi.write(0x00); //set seconds value to 00
gCS_RTC=1;
gCS_RTC=0;
spi.write(0x82);
- spi.write(0x01);//set minutes value to 00
+ spi.write(0x00);//set minutes value to 00
gCS_RTC=1;
gCS_RTC=0;
spi.write(0x83);
- spi.write(0x23); //set the hours to 01
+ spi.write(0x00); //set the hours to 01
gCS_RTC=1;
gCS_RTC=0;
@@ -65,17 +65,17 @@
gCS_RTC=0;
spi.write(0x85);
- spi.write(0x31); //set date of the month to 01
+ spi.write(0x01); //set date of the month to 01
gCS_RTC=1;
gCS_RTC=0;
spi.write(0x86);
- spi.write(0x12); //set month to 01
+ spi.write(0x01); //set month to 01
gCS_RTC=1;
gCS_RTC=0;
spi.write(0x87);
- spi.write(0x01); //set year to 00(2000)
+ spi.write(0x00); //set year to 00(2000)
gCS_RTC=1;
gPC.puts("\n\r rtc initalised \n");
SPI_mutex.unlock();
