...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#include <msp430.h> /* * main.c */ int main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer P1OUT &= ~BIT0; P1DIR |= BIT0; TACTL |= TASSEL_2 | MC_2 | ID_3; TACCTL0 |= CCIE; TACCR0 = 65535; __enable_interrupt(); for (;;) { } return 0; } #pragma vector = TIMERA0_VECTOR __interrupt void PORT1TIMERA0_ISR(void) { P1OUT ^= BIT0; } |
...