elpaso 15 Posted August 29, 2013 Share Posted August 29, 2013 Another trivial port... this is the RTCLib I've been using for a couple of AVR projects, it runs with really minor modifications (just stripped out PROGMEM related stuff). I've already pulled a request to the main repo (I've been contributing DS1388 to this lib in the past). While the pull gets in, here is the library on my fork: https://github.com/elpaso/rtclib I've tested the library on my LP 1.5 with a DS1388 (3.3V version) and it's working fine. Example #include <Wire.h> #include <RTClib.h> RTC_DS1388 RTC; DateTime now; // Ugly globals... uint8_t timeH; uint8_t timeM; volatile uint8_t timeS; uint8_t dateD; uint8_t dateM; uint16_t dateY; uint8_t dateW; void setup() { Wire.begin(); RTC.begin(); if (!RTC.isrunning()) { // following line sets the RTC to the date & time this sketch was compiled RTC.adjust(DateTime(__DATE__, __TIME__)); } } void loop() { // Read clock now = RTC.now(); timeH = now.hour(); timeM = now.minute(); timeS = now.second(); dateD = now.day(); dateM = now.month(); dateY = now.year(); // Do something with those figures... } bluehash, simpleavr and reaper7 3 Quote Link to post Share on other sites
bluehash 1,581 Posted September 3, 2013 Share Posted September 3, 2013 @@elpaso Thanks! Quote Link to post Share on other sites
howardcmc 0 Posted March 21, 2014 Share Posted March 21, 2014 I've tested the library on my LP 1.5 with a pcf8563 and can not compile ok.Thanks! Quote Link to post Share on other sites
bluehash 1,581 Posted March 21, 2014 Share Posted March 21, 2014 I've tested the library on my LP 1.5 with a pcf8563 and can not compile ok.Thanks! @@howardcmc Welcome to 43oh! It would be awesome if you let us know your Energia version and the error output. Quote Link to post Share on other sites
pivden 6 Posted September 16, 2014 Share Posted September 16, 2014 I've tested the library on my LP 1.5 with a pcf8563 and can not compile ok.Thanks! rty change in sketch #include <RTClib.h> to #include "RTClib.h" and check files <PATH TO ENERGIA>\hardware\msp430\libraries\RTClib\rtclib.cpp <PATH TO ENERGIA>\hardware\msp430\libraries\RTClib\rtclib.h Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.