This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F2122 Timers

Other Parts Discussed in Thread: MSP430F2122

Hello everyone!

Is the first time when i work with the MSP430 MCU's and i don't know much about them.

I'm  trying to make a led blink ( on PORT 1.6 of MSP430F2122 ) with timers. It works fine with delays, but i want to use timers for learning.

Here is my code, my guess is that the MCU doesn t reach to the interrupt but i don t know why.

Btw, i'm using Code Composer 6.

#include <msp430f2122.h>

unsigned int timerCount=0;
void main(void) {
	WDTCTL = WDTPW + WDTHOLD;		// Stop watchdog timer
	P1DIR |= BIT6;
	P1OUT |= BIT6;
	CCTL0=CCIE;
	TACTL=TASSEL_2 + MC_2 + TAIE;
	//CCR0=50000;

	__bis_SR_register(LPM0_bits + GIE);
}


__interrupt void Timer_A (void)
{
	timerCount = (timerCount + 1) % 20;
	if(timerCount ==0)
	P1OUT^= BIT6;
}

Thank you and have a nice day !

**Attention** This is a public forum