If a timer module has TA0.0, TA0.1, TA0.2, TA0.3 and TA0.4, you can have four independent hardware PWMs based on the same frequency. CCR0 (TA0.0) sets this frequency. CCR1 (TA0.1), CCR2 (TA0.2), CCR3 (TA0.3) and CCR4 (TA0.4) set the duty-cycle for the PWMs. They can each be different as long as they are within the CCR0 value. Outputting TA0.0 on a pin does not make much sense, only the four PWMs from TA0.1 to TA0.4. The CCR values could be: Timer clock 10MHz CCR0 = 1000 for a fixed frequency of 10kHz for all four PWMs CCR1 = 100 for a duty cycle of 10% CCR2 = 250 for a duty cycle of 25% CCR3 = 500 for a duty cycle of 50% CCR4 = 750 for a duty cycle of 75% Dennis
↧