msp430 timer programming interrupt based
Basically msp4302xxx family has two 16-bit timers. Timer A and Timer B. We will see today about Timer A. Timer A can work in four modes based on the values of MCx in TACTL register If MCx = 00 then it is in stop mode. It means the timer is stopped. If MCx = 01 then it is in Up mode. It means the timer counts up to the value present in the TACCR0 register and goes to zero and repeats the cycle If MCx = 10 then it is in Continuous mode,in which the timer counts up to the value 0xffff and jumps to zero and repeats the same. If MCx = 11 then it is in Up/Down mode where the timer counts up to the value present in the TACCR0 and starts decrementing to zero and again starts from zero to TACCR0 The timer can be sourced from either ACLK,TACLK,SMCLK and INCLK with a divisor factor upt0 8 based on the values of TASSELx and IDx in the TACTL register We will see how to program the timer A present in msp430. For programming we have to use the Timer A registers. 1) TAR: ...