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.
I am using my MSP430G2231 Timer A to create a PWM. I'm using IAR and programming in assembler.
At first I used P1.5 as the output (so I could view the output with my scope). P1.5 allows you to set the output to TA0.0. This, unfortunately didn't work. I changed the output to P1.2 which allows you to set the output to TA0.1 which does work.
So, I have the PWM working, but my question is:
What is the difference between TA0.0 and TA0.1??
None of the documentation (user guide, application notes by Bierl, or Spec sheet) say anything about it!
Thanks for the help,
Joanna
The datasheets and user guides don't give a simple description of how the timers function; so here's my best explanation from experience:
TA0 is run by a counter - TA0R. Usually when set up as a PWM, TA0R is counting up to TACCR0, then resetting back to 0. TACCR0 is basically the period of you PWM output. As far as I know, TA0.0 is a meaningless output set up as a PWM. Now, all other timer channels (ie TA0CCR1) set the duty cycle for the PWM output. TA0.1 output changes every time the TA0R counter equals the TA0CCR1 value and every time TA0R resets back to 0 (after reaching TACCR0).
So basically your TA0.0 output is meaningless as a PWM because its counter register sets the PWM period. All other channels (TA0.1, TA0.2, etc) can output a different duty cycle depending on their register values (TA0CCR1, TA0CCR2, etc) - so use any timer channel for a PWM output except for channel 0 (TA0.0).
This may not be the most technically correct or complete description; but it's what I use to do simple PWM outputs...
- Chad C.
Thanks for the response!
That makes a lot of sense based on what I saw at the outputs. But what is TA0.0 used for if it is meaningless for PWM outputs?
Joanna
I would agree the TA0.0 output is not useful when you are interested in PWM outputs as CCR0 is the compare register used to set the PWM base frequency. However, the Timers have a number of modes of operation and one of those could be to generate a unique time base. If this frequency is needed external to the device, then propagating this signal out is necessary.
These signals can also be used as capture inputs, so again, having access to the signals would be appropriate.
For non-PWM outputs :) You can use it for timing/gating purposes. Or as input for capturing.Joanna Boetzkes said:But what is TA0.0 used for if it is meaningless for PWM outputs?
**Attention** This is a public forum