|
已经是最简单的测试小程序了.......
#include "msp430x54x.h"
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
P1DIR |= 0x01; // Set P1.0 to output direction
while (1) // Test P1.4
{
if (0x010 & P1IN)
P1OUT |= 0x01; // if P1.4 set, set P1.0
else
P1OUT &= ~0x01; // else reset
}
} |
|