MSP-EXP430F5529LP开发板001-GPIO
[复制链接]
代码很简单,改编自TI官网例程,如下所示(编译环境为IAR):
#include "io430.h"
int main( void )
{
volatile unsigned int i;
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;
P1DIR |= BIT0; // P1.0 set as output
while(1) // continuous loop
{
P1OUT ^= BIT0; // XOR P1.0
for(i=50000;i>0;i--); // Delay
}
//return 0;
}
下载后成功运行:
|