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.

求助...定时器不走



器件:launchpad g2553

想让定时器输出PWM...用DCO作为时钟源

void main( void )
{
  WDTCTL = WDTPW + WDTHOLD;                     //WDT STOP
 
  P1DIR|=BIT6;                                  //Port setting
  P1OUT=0x00;
  P1SEL|=BIT6;
 
  DCOCTL=CALDCO_1MHZ_ ;                       //Clock Setting
  BCSCTL1=CALBC1_1MHZ_;
 
  TACTL|=TASSEL_2+MC_1+ID_3+TAIE;                     //TimerA setting
  TACCTL1|=~CAP+OUTMOD_3;
  TACCR0=8000;
  TACCR1=2000;
  _EINT();
  while(1)
  {
    _NOP();
  }

}

 

用IAR软件仿真时,TAR一直不动........定时器不走..