...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#include <msp430.h>
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
P1OUT &= ~BIT0;
P1DIR |= BIT0;
TA0CTL |= TASSEL_2 | MC_2 | ID_3;
TA0CCTL0 |= CCIE;
TA0CCR0 = 65535;
__enable_interrupt();
for (;;) { }
return 0;
}
#pragma vector = TIMER0_A0_VECTOR
__interrupt void TIMER0_A0_ISR(void) {
P1OUT ^= BIT0;
} |
...