generate two PWM signal with only 2 CCR ( CCR0 & CCR1)

Status
Not open for further replies.

yassin.kraouch

Advanced Member level 2
Joined
Jul 5, 2009
Messages
631
Helped
40
Reputation
80
Reaction score
40
Trophy points
1,308
Activity points
5,094
please i need help, i have an msp430 mmicrocontroller, that have only two CCR ( CCR0 & CCR1), i wish to output two PWM signal with same frequence but without the same duty cycle, is this possible ? and how can i do this ?
 

If it has two CCRs then it should be able to generate two PWMs. They will definitely have the same frequency (because it's the same clock that runs them). The duty cycle is set by writing a value to the CCR. Check the datasheet for the appropriate registers for setting it up. Also, see 43oh.com forums.
 

Hi,

Here's a fairly nice tutorial with code to setup both PWM channels for output simultaneously:




The tutorial appears answer your question and demonstrate it with sample code as well.

Hope this info helps in your endeavors.
 

ok but the poblem is that i want that this two PWM will drive two N-MOSFET, so i need a deand time between this two signal
 

So, code accordingly.

The PWM waveform parameters are not written in stone, you can modify them during runtime.

---------- Post added at 10:23 ---------- Previous post was at 10:10 ----------

If you actually drew a timing diagram of the two pulse chains in relationship to one another, I should be able to make recommendation as to the required code.
 

i have only one timer (timer A), so i like to output two signal PWM with frequency 1 khz and with two different duty cycle with dead time, for 60% and 40% duty cycle, i used the MSP430F2011IPW microcontroller
 

I also have the same question about PWM output in MSP430. I have a MSP430F169, and i need output nine channels of PWM wave. Can I do it ?
Now I can have eight channels not nine channels. First, in TIMER A, TACCR0 for period, TACCR1 for one duty cycle, and TACCR2 for another duty cycle. Second, in TIMER B, TBCCR0 value for period, TBCCR1~TBCCR6 value for six duty-cycle. So now finally I got eight channels PWM by MSP430F169. Is there possible to output nine channels by MSP430F169?
 

If you want the same frequency in all PWM channels you can set one timer to that freq. and then just compare each Duty Cycle to that timer and then set the corresponding PIN, and do the same with each channel, and the when the timer overflow you need to set all channels to 0 and start over.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…