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.

MSP430 and input capture without interrupts

Other Parts Discussed in Thread: MSP430G2553

Greetings!

We are using the MSP430G2553 launchpad, and we are trying to use Timer A0 as an input capture counter with an external input, but NO interrupt (we want the counter to count positive edges, but not generate an interrupt).

The external input is on pin P1.0, and we are using a 10kHz square wave to test this input.  When we run the launchpad, we don't see any change in the TA0CCR0 register.  What have we done wrong?

I have pasted the relevant code for the Timer_A setup here:

  ///////////////////////////////////
  //Enable the timer as a counter, but NO interrupts:

  P1DIR = P1DIR & (~BIT0); //Set direction bit 0 (P1.0) to 0 as an INPUT
  //P1 selection bits to use P1.0 as an input to TA0CLK):
  P1SEL = P1SEL | BIT0;
  P1SEL2 = P1SEL2 & (~BIT0);
  //ADC selection bits:
  ADC10AE0 = ADC10AE0 & (~BIT0);

  //TACTL register:
  TACTL = TASSEL_3 | MC_2; //Use INCLK and continuous count (up to 0xFFFF)

  //TACCTL0 register:
  TACCTL0 = CM_1 | SCS | CCIS_0 | CAP; //Capture on POSITIVE edge, synchronize to micro clock, CCI0A input for capture source, and CAPTURE mode
  ///////////////////////////////////////
  

 

**Attention** This is a public forum