rando 4 Posted August 21, 2012 Share Posted August 21, 2012 Sirs, Just a polite interrogative ... what would it take to port the Arduino Time library, (time.h) to run on the MSP420g ... and work in Energia? http://arduino.cc/playground/Code/Time Great job on new release! R. Quote Link to post Share on other sites
Rickta59 589 Posted August 21, 2012 Share Posted August 21, 2012 Some parts should port fairly easily. The problem would be in using the various time sources. TimerSerial should work. TimerGPS less so as we don't have a NewSoftSerial library. You would have to write one of those yourself. The TimeNTP time source uses networking so it isn't going to port without a lot of effort. There really isn't a standard networking card for the launchpad. So there isn't any networking code to use. Other than the time sources, some of the code is very AVR specific. It uses the avr-gcc macro PROGMEM which isn't valid for the msp430. char monthStr1[] PROGMEM = "January"; The msp430 uses a more conventional approach to storing strings in flash it would be: const char monthStr1[] = "January"; -rick Quote Link to post Share on other sites
gordon 229 Posted August 21, 2012 Share Posted August 21, 2012 I am pretty sure you can just #define PROGMEM to oblivion, should bringing unchanged code over tickle your fancy. (It has to do with the AVR being Harvard and this IIRC is their way of tricking data to be "code" (so as to make it reside in flash or something), whereas even the concept doesn't exist on a von Neumann '430.) Ed. well, yeah, then you still have to constify, so unchanged won't fly too far anyway... . 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.