#include <msp430x14x.h>
unsigned int timer;
unsigned char jishu1,IO_now,i;
unsigned char code[]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};
void main(void)
{
char i,j;
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
P4DIR |= 0XFF;
while(1)
{
P4OUT = 0X55;
for(i=0;i<155;i++)
for(j=0;j<125;j++){;}
P4OUT = 0XAA;
for(i=0;i<155;i++)
for(j=0;j<155;j++){;}
}
}
最简单的程序:点亮led
|