can i generate 6 PWMs using P89v51RD2 for the PMSM motor driver.?

Thread Starter

jack7

Joined Mar 16, 2013
6
hello..
i'm using the controller P89V51RD2.
i got to generate 6 simultaneous PWMs for the inverter driver of the PMSM motor.
so can any one help me out in this.
i'm facing problem in getting the 6th PWM using P89V51RD2 and i got 5.
 

Thread Starter

jack7

Joined Mar 16, 2013
6
and i got to run a 3 phase motor of 50hz through this inverter so now whatever is the freq of this required...
 

Ian Rogers

Joined Dec 12, 2012
1,136
Set up timer 0 to count 127... if you use a prescale of 1:1 you should be able to generate a PWM out..

Two variables... On and Off
Off is always the opposite of On

so 50% will be on= 127 and off = 127

Every interrupt toggles between on and off..
If you pre-load the timer with one or the other value in sequence

So 25% will be off 192 and on will be 64
75% will be off 64 and on 192....

This maintains the period at @2khz with an 8 bit duty cylce.
 
Top