jeshuah reacted to grahamf72 in [Energia Library] MSP430 Real Time Clock
Updated version of the library attached. Main changes are:
Configuration option allows the Watch-Dog Timer to be used for the RTC instead of TimerA. This also requires replacements for the functions in wiring.c. A side effect caused by limitations of the 430 hardware is that delay, millis and micros only have a resolution of 1.9mS. Added helper functions to convert the hmsDMY time into UnixTime format, return day-of-week, etc. Added an alarm class. Improved documentation. RTCplus.zip
jeshuah got a reaction from calinp in Real-Time Clock (RTC) Library for the MSP430/LaunchPad
I'm working on a simple alarm clock with an RGB 16x2 LCD display as a learning vehicle for the MSP430/LaunchPad and Energia. This thread has been awesome -- many thanks to xv4y and grahamf72 for posting their code!
I needed a more full-functioned calendar than what Graham had posted in RTCplus.zip on 1/29 (I haven't checked out his latest update in the "Libraries" section yet), so I took a slightly different tack and used Yan's timer code to create a simple RTC library that can be used to synchronize with the Time.h (and TimeAlarm.h) Arduino libraries here:
The library is attached, along with an example sketch, in case any one else finds it useful...
jeshuah reacted to grahamf72 in Real-Time Clock (RTC) Library for the MSP430/LaunchPad
I discovered I actually had the stray dot in my documentation - oops!! sorry.
I haven't found as much difference in compilation size as you are getting. I am only finding 36 bytes difference between directly calling Clock.Inc_sec() and using Clock++ but given that every byte is precious, I have updated my library to create an inline function Inc() which calls Inc_sec() or Inc_chunk() depending on the tick size. I have left the ++ operators in so you can still use them if you wish - the compiler is smart enough that the ++ operators don't create any overhead if you don't use them.
Attached is the latest version of my RTCplus library, with the Inc function and corrected documentation. I have also removed the documentation from the .cpp file and put it all in the .h file, it makes it easier for me to not have to keep two sets of the same stuff synchronised.
I am curious about this optimised LCD1602 4 bit library you mention. I have been using the LiquidCrystal library that is included with Energia. Where did you find this 4 bit optimised library?
jeshuah reacted to xv4y in Real-Time Clock (RTC) Library for the MSP430/LaunchPad
On this page you can find the code for a simple C library using the RTC capabilities included in the MSP430g2553 shipped with the LaunchPad.
I know TI already offer a nice RTC lib but it is in assembler and not easy to compile outisde of the given IDE.
This one has been designed to work under Energia and should be easier to port.
jeshuah reacted to Rei Vilo in How Do I Add Libraries To Energia?
Generally speaking, here's the procedure to add a library to Energia:
Define the folder for the sketchbook: menu Energia > Preferences > Sketchbook Location
eg. ~/Documents/Energia or /users/name/Documents/Energia