David Bender 28 Posted September 10, 2013 Share Posted September 10, 2013 This DCO calibrator starts with me not having a crystal on my board, and stealing rick's idea about using the UART to calibrate the DCO. It works without the UART peripheral or capture compare. The host sends the 'U' character and the micro responds with what adjustment it made, or that it calibrated to the target frequency. When the micro is calibrated, it sends the calibration constant values to the host, which prints them for the user. I used an oscope to verify the frequency on the P1.4's SMCLK output. Code is here: https://github.com/analog10/UART_DCO_Calibrator rick's original concept is here: https://github.com/RickKimball/msp430_code/blob/master/fabooh/examples/serial/dco_calibrate/goldilocks.cpp bluehash, GeekDoc, tripwire and 2 others 5 Quote Link to post Share on other sites
tingo 22 Posted September 15, 2013 Share Posted September 15, 2013 This is handy to have - thanks! Quote Link to post Share on other sites
bluehash 1,581 Posted September 22, 2013 Share Posted September 22, 2013 This DCO calibrator starts with me not having a crystal on my board, and stealing rick's idea about using the UART to calibrate the DCO. It works without the UART peripheral or capture compare. The host sends the 'U' character and the micro responds with what adjustment it made, or that it calibrated to the target frequency. When the micro is calibrated, it sends the calibration constant values to the host, which prints them for the user. I used an oscope to verify the frequency on the P1.4's SMCLK output. Code is here: https://github.com/analog10/UART_DCO_Calibrator rick's original concept is here: https://github.com/RickKimball/msp430_code/blob/master/fabooh/examples/serial/dco_calibrate/goldilocks.cpp @@David Bender, Do you have a link to @@Rickta59 's idea or was it on IRC Very good idea BTW. Quote Link to post Share on other sites
David Bender 28 Posted September 23, 2013 Author Share Posted September 23, 2013 I just googled enough to find goldilocks.cpp, I can't really provide a link beyond that. Quote Link to post Share on other sites
oPossum 1,083 Posted September 23, 2013 Share Posted September 23, 2013 I don't think Rick posted it here. I did something similar for AVR and MSP430: http://forums.adafruit.com/viewtopic.php?f=24&t=5078 http://forum.43oh.com/topic/1375-characterize-dco-without-32768-khz-xtal/ Quote Link to post Share on other sites
Rickta59 589 Posted September 23, 2013 Share Posted September 23, 2013 It wasn't my idea. I think I first noticed the concept in an ATMEL application note: http://www.atmel.com/Images/doc2555.pdf I've also liked @oPossums solution. However that is geared towards CCS and CCS asm. My main purpose was to provide a simple example that combined timers and fabooh's serial implementation. And more importantly to provide an answer to g0rdon's IRC question. -rick Quote Link to post Share on other sites
David Bender 28 Posted October 3, 2013 Author Share Posted October 3, 2013 Updated the utility so the clock speed can be specified at run time (rather than compiled into FW). Convergence is also much faster. 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.