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

Discussion in 'Embedded Systems and Microcontrollers' started by jack7, Mar 16, 2013.

  1. jack7

    Thread Starter New Member

    Mar 16, 2013
    6
    0
    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.
     
  2. jack7

    Thread Starter New Member

    Mar 16, 2013
    6
    0
    can anyone please help me in this..
    :confused:
     
  3. Ian Rogers

    Member

    Dec 12, 2012
    158
    29
    Whats the frequency period you are after... If it's around 2khz you'll be able to do one in software...
     
  4. jack7

    Thread Starter New Member

    Mar 16, 2013
    6
    0
    how...?
    in which s/w...?
    and can i do that in keil compiler...?
     
  5. jack7

    Thread Starter New Member

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

    Member

    Dec 12, 2012
    158
    29
    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.
     
  7. jack7

    Thread Starter New Member

    Mar 16, 2013
    6
    0
    that won't work cause i got to generate 6 PWMs.
    and with the timer it won't be possible i think..
     
Loading...