legailutin 11 Posted September 6, 2012 Share Posted September 6, 2012 Hi everyone, I got really excited when I discovered energia. I had stepped away from ccs for a while after multiple frustrations with a little project of mine. So thousand thanks for this IDE. Already making my programming life a lot more easier. Then to the point. I soldered the watch crystal to the launchpad and wanted to test it with my scope. For that, I loaded the blink code. Just as a reminder, it is supposed to turn the LED ON and OFF every second. However my scope is reading 1.02 seconds. I went into wiring.c and commented out the BCSCTL3 |= LFXT1S_2; line as directed in one of the posting, still to no avail. Am I missing something or my crystal is just not working? Thanks to the community. Quote Link to post Share on other sites
energia 485 Posted September 6, 2012 Share Posted September 6, 2012 If you have used the Blink example unmodified then it uses delay() which is coming of the watchdog timer that is fed by the MCLK. I think this example done by xv4y should help you http://xv4y.radioclub.asia/page/5/ xv4y implemented a small RTC library that uses the external crystal to keep time. legailutin and xv4y 2 Quote Link to post Share on other sites
clay_shooter 2 Posted September 8, 2012 Share Posted September 8, 2012 I used the code on this page http://mspsci.blogspot.com/2010_06_01_archive.html It sets up the timer that can be driven from the crystal. It requires CCS but you should get the general idea. Quote Link to post Share on other sites
paradug 4 Posted September 9, 2012 Share Posted September 9, 2012 Check out this Instructable for how to tune the clock crystal. This step of the Instructible also includes a simple program so you watch the timing of your crystal on the scope. http://www.instructables.com/id/MSP430- ... -Capacita/ Quote Link to post Share on other sites
legailutin 11 Posted September 10, 2012 Author Share Posted September 10, 2012 Hi guys! I'm very pleased with the responses. I actually went ahead and tried the code from viewtopic.php?f=38&t=2688 with the slight modification in wiring.c and it works perfectly: 1sec exactly according to my scope. Now, on to the next step. 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.