Hi,
I am using MSP430G2352. In my application i use timer A in up mode to generate PWM output. and i want to use timer for timer interrupt. since this micro has only one timer can use same chip for both purpose.
THanks,
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.
Hi,
I am using MSP430G2352. In my application i use timer A in up mode to generate PWM output. and i want to use timer for timer interrupt. since this micro has only one timer can use same chip for both purpose.
THanks,
IE your timer interval should be a multiple of the pwm frequency for simplicity.
Well, it must be exactly the PWM frequency. The interrupt may happen at the timer overflow or at the end of the duty cycle. But it will happen once per timer cycle, which is also the PWM frequency.Andrew Marsh said:IE your timer interval should be a multiple of the pwm frequency for simplicity.
However, inside the timer ISR, you may chose to skip every 2nd interrupt or 2 of 3 or so, by increasing a counter and only doing some actin when the counter reaches a certain value.
**Attention** This is a public forum