// MSP430F135
// | P5.4|–>MCLK = DCO Max
// | P5.5|–>SMCLK = DCO 1/2
// | P5.6|–>ACLK = 32kHz
//******************************************************************************
#include <msp430x13x.h>
void main (void)
{
WDTCTL = WDTPW + WDTHOLD; // STOP WDT
DCOCTL |= DCO0 + DCO1 + DCO2;
BCSCTL1 |= RSEL0 + RSEL1 + RSEL2; //DCO MAX DCO内部晶体震荡设置,现在是开到最大
BCSCTL2 &= ~SELM0 + SELM1 ; /* MCLK Source Select DCO 默认主系统时钟就是DCO*/
BCSCTL2 &= ~SELS + DIVS0 ; /* SMCLK Source Select DCO (DIVS0 to 0)*/
BCSCTL2 |= DIVS1; /* SMCLK 1\2(DIVSx to 0,1)*/
P5DIR |= 0x70; // P5.6,5,4 outputs
P5SEL |= 0x70; // P5.6,5,5 options
while(1)
{
}
}