2013-03-07 23:55:05 -07:00
|
|
|
#include <msp430.h>
|
|
|
|
|
|
|
|
unsigned int i = 0;
|
|
|
|
|
2013-03-11 17:14:29 -06:00
|
|
|
unsigned char bits1 = BIT0 + BIT1 + BIT2 + BIT3 + BIT4 + BIT5 + BIT6 + BIT7;
|
|
|
|
unsigned char bits2 = BIT0 + BIT1 + BIT2 + BIT3 + BIT4 + BIT5;
|
|
|
|
|
2013-03-07 23:55:05 -07:00
|
|
|
int
|
|
|
|
main(void)
|
|
|
|
{
|
|
|
|
WDTCTL = WDTPW + WDTHOLD;
|
2013-03-11 17:14:29 -06:00
|
|
|
P1DIR |= bits1;
|
|
|
|
P2DIR |= bits2;
|
|
|
|
|
|
|
|
P1OUT |= bits1;
|
|
|
|
P2OUT &= ~bits2;
|
2013-03-07 23:55:05 -07:00
|
|
|
|
|
|
|
for (;;) {
|
2013-03-11 17:14:29 -06:00
|
|
|
i = (i + 1) % 40000;
|
2013-03-07 23:55:05 -07:00
|
|
|
|
|
|
|
if (i == 0) {
|
2013-03-11 17:14:29 -06:00
|
|
|
P1OUT ^= bits1;
|
|
|
|
P2OUT ^= bits2;
|
2013-03-07 23:55:05 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|