Jump to content
43oh

Yet another DCO calibrator


Recommended Posts

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

Link to post
Share on other sites

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.

Link to post
Share on other sites

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

Link to post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...