以下我写的代码,可是在proteus中仿真出不来效果
void main( void )
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;
TACTL=TASSEL_2+ID_1+MC_1;
CCTL0|=CCIE;
CCR0=50000;
P2DIR=0x0f;
P2OUT=0x0f;
__bis_SR_register(GIE);
}
#pragma vector=TIMERA0_VECTOR
__interrupt void Timer_A (void)
{
unsigned int i=0;
P2OUT &= ((0X01)<<(i++)); |