Search the Community
Showing results for tags 'timer A'.
Hello all, I am struggling to set up a timer to implement a "wait" function. Basically, I have a piece of code that lights up a few LED's, then I want to wait a couple seconds and turn them off. The way I have it implemented at the moment: Timer configuration (in main function) // DCO configuration DCOCTL = CALDCO_1MHZ; //Set DCO to 1 MHz BCSCTL1 = CALBC1_1MHZ; // Calibrate internal clock for 1 MHz // Timer_A configuration TACTL = TASSEL_2 + TACLR + ID_3 + MC_0; CCTL0 |= CCIE; TACCR0 = 125; // 1 ms period ISR routine #pragma vector = PORT1_VECTOR __interrupt void