求助,关于msp430编写一个流水灯程序

2020-07-08 财经 534阅读
程序如下,
/*
* main.c
*/
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
PM5CTL0 &= ~LOCKLPM5;
P1SEL1=0x00;
P1SEL0=0x00;
P1DIR=0xFF;
while(1)
{
P1OUT|=BIT3;
__delay_cycles(8000000);
P1OUT&=BIT3;
__delay_cycles(8000000);
P1OUT|=BIT4;
__delay_cycles(8000000);
P1OUT&=BIT4;
__delay_cycles(8000000);
P1OUT|=BIT5;
__delay_cycles(8000000);
P1OUT&=BIT5;
__delay_cycles(8000000);
}

return 0;
}
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com