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.

MSP430F2013: Trying to get two PWMs out of 2013

Part Number: MSP430F2013
Other Parts Discussed in Thread: MSP430FR2311

Good evening....

I have a quick question...I have tried everything I can think of to get two PWM signals out of the MSP430F2013.  Is it not possible?  I have tried timer in up, continuous and up / down mode.  It appears that it uses TACCR0 and TACCR1 register values to define ONE single PWM output.   No matter what I seem to do with TACCTL0 and TACCTL1 with both P1.1 and P1.2 set as TA0 and TA1 respectively I only seem to get ONE PWM.

Sincerely

Steve    

  • The short answer: No, you can't. This is what UG (SLAU144J) Sec 12.2.5.1 means by "Output modes 2, 3, 6, and 7 are not useful for output unit 0, because EQUx = EQU0." I.e. the two transitions happen simultaneously.

    There's always software PWM -- wiggling P1OUT explicitly based on timer interrupts -- which is more software work but provides as many streams as you have pins.

    There's also something in between: By using Continuous mode and OUTMOD=4, you can use the timer ISRs to add to TA0CCR0 and TA0CCR1 to "walk" the trigger points forward. This is almost as much work as software PWM, but has the advantage that the hardware is doing the signal transitions (no jitter). 

  • Hello Bruce...

    Thank you for your response....Yes I was afraid of that....  I understand the Timer option....Downside of course is latency getting into and out of ISR which means minimum resolution.  Is there a small package (like the G or F 2012, 13, ect) MSP which has one Timer with 3 CC registers? (ie 2 PWMs).  Looks like the most viable solution hw would be to move up to the 22xx family

    Thanks

    Steve 

  • Your best bet is the selection tables at

    http://www.ti.com/microcontrollers/msp430-ultra-low-power-mcus/products.html

    but as an existence proof: The MSP430FR2311 comes in a 16- or 20-pin package, and has 2x timers (Timer_B, actually better than Timer_A for PWM)  each with 3xCCRs.

    The TSSOP-16 lacks a TB1.2 pin, but the VQFN-16 has it. (If you're looking for a DIP, you won't find it outside the F2/G2 series.)

    It also has gizmos that the F2012 lacks, like UART/SPI/I2C/ADC. It has slightly cheaper siblings, if that's more than you need.

**Attention** This is a public forum