先前玩过了msp430g2553 launchpad.玩f5529比较熟悉点。
由一图可知用户的灯在P1.0,P8.1,P8.2.
由二图简单创建工程。
#include
/*
* main.c
*/
void main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
P1DIR |= BIT0;
P8DIR |= BIT1 + BIT2;
for(;;)
{
P1OUT = BIT0;
_delay_cycles(50000);
P1OUT &= ~BIT0;
P8OUT = BIT1 + BIT2;
_delay_cycles(50000);
P8OUT &= ~(BIT1 + BIT2);
_delay_cycles(50000);
}
}
一闪一闪亮晶晶~