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.

MSP430G2553: Event Counter

Part Number: MSP430G2553

Hi,

Can someone help me configure TimerA as a simple event counter. I've tried this but I don't see TACCR0 incrementing when I toggle P1.0:

	TA0CTL = TASSEL_3 + MC_2;                   // INCLK,
	TA0CCTL0 = CM_1 + CCIS_0 + CAP;               // edge triggerd
	P1SEL |= BIT0;				// TA0CLK = INCLK???

thank you.

  • you should check TAR for the event count. Not TACCR0. Check, and understand, Fig 12-1 in the MSP430x2xx Family guide.

    Line 1 - use TASSEL 0 -- see 2553 datasheet Table 12. INCLK is for Pinosc.
    - use TACLR to clear TAR
    - use MC 2 to count up to 0xffff

    Line 2 - not needed since we've selected MC 2

    Line 3 - correct, see 2553 data sheet table 16


    ----- then check TAR - it should increment by one for each positive edge on P1.0


    (Do click the button if this answer works)

**Attention** This is a public forum