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.

UCD3138: Two Different Duty Cycle

Part Number: UCD3138

Hi everyone

Is it possible to have two different open loop duty cycle for a DPWM module in UCD3138. For example, let say x is the threshold for the filter output, below x, i want to drive the PWMs at 30% duty cycle, above x 60% duty cycle.

Thanks in advanced

Regards

Steve 

  • What do you mean with filter output?

    If you set a CLA filter to use CPU_SAMPLE (lab 3 I believe) and to pass all with unity gain (no integrator, no derivative), you can accomplish what you are asking I believe.
    if(...condition) CPU_SAMPLE=30%
    else CPU_SAMPLE=60%

    If I have not understood your question, please elaborate

    Marco

  • Thank you for the reply Marco. Sorry, I am gonna try to explain more detailed.

    In Digital Power Peripherals Programmer's Manual, Automatic Mode Switching part, it's written as the mode changings can be done by filter duty. In my application, I have two different DPWM modules. One is driven by filter duty, the other one has fixed duty cycle.

    What I want is that when the filter duty is below the threshold, the DPWM which has fixed duty cycle has 30% duty cycle, above the threshold, it has 60% duty cycle.

    I hope this explanation is more clear than the first

    Regards
    Steve
  • Steve, you don't make it clear whether you want to use one or two outputs.  But in any case, you should be able to use the Automatic Mode Switch feature to do what you want. 

    The secret is the intra-mux.  The intra-mux is actually the last thing before the pin.  It lets you multiplex DPWM outputs to different pins than the default pin. 

    So first you need to set up two DPWM outputs for each pin you want to use - one fixed at 30%, and one fixed at 60%.

    You can set up a DPWM with fixed outputs very simply by putting the desired timings into the EVENT registers and not enabling the CLA to drive it.  Leave it in normal mode

    You can also enable DPWM C on one or more DPWMs - its start and stop are set by the Blanking B registers if you enable that, and it is always fixed.  It doesn't have a dedicated pin, so it only comes out through the intra-mux.

    Then you can set up the IntraMux registers in the regular control register and in the auto registers to control which DPWM output is actually connected to the physical pin.

    Note that the Intra-mux is limited - it doesn't let every DPWM output go to every pin.  So you'll have to plan relatively carefully.