刚开始学习这款单片机,很多不懂的,其中
MOV #53H,&DCOCTL是怎么确定频率的?谢谢
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
其次,也可具体参照你选用的芯片的datasheet,下图是从MSP430G2553 datasheet中截取的
而且,一般芯片在出厂时会包含DCO的校准值,MSP430G2xx1只有1MHz;MSP430G2xx2和G2xx3,有1M,8M,12M,16MHz,具体代码(1MHz)为:
if (CALBC1_1MHZ ==0xFF || CALDCO_1MHZ == 0xFF)
{
while(1); // If calibration constants erased, trap CPU!!
}
BCSCTL1 = CALBC1_1MHZ; // Set range
DCOCTL = CALDCO_1MHZ; // Set DCO step + modulation