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.

MSP430G2553用CCS5测试,为什么延时程序不执行啊

Other Parts Discussed in Thread: MSP430G2553

#include <msp430G2553.h>

 void delay(unsigned int z);

int main(void)

 {   WDTCTL = WDTPW + WDTHOLD;                  // Stop Watchdog  Timer  

P1DIR |= 0x41;                            // P1.0,1 and P1.4 outputs

  while(1)  

 {     P1OUT |= 0x01;                         //0100 0001 P1.1 = 1    

 delay(100);    

 P1OUT &= ~0x01;                         // P1.1 = 0    

 delay(100);    

P1OUT |= 0x40;                         //0100 0001 P1.1 = 1    

 delay(100);    

P1OUT &= ~0x40;                         // P1.1 = 0    

delay(100);  

}

 }

void delay(unsigned int z)

 {  

 unsigned int i,j;  

for(i=z;i>0;i--)   

 for(j=100;j>0;j--);

 }