Forums

4 x phase shift PWM modulation with LPC2138

Started by xoldikx December 26, 2006
Hello to all,
Im still newbie here, I need help with PWM modulation on LPC2138. I
want to riding stepper motor, I have a driver L6203, in one piece of
this driver there are 2 transistors, so I need 2 this drivers to
riding one motor. But I want to ride motor as unipolar, so I need 4
double edge controlled pwm chanels, but procesor allow only 3 double
edged controlled chanels. When I use single edged chanels, there is no
chance how to do phase shift, because all single edged pwm channels
have the beggining at the same moment. I have no idea how to do 4
times pmw modulation.
Thanks for all ideas
Oldik

An Engineer's Guide to the LPC2100 Series

--- In l..., "xoldikx" wrote:
>
> Hello to all,
> Im still newbie here, I need help with PWM modulation on LPC2138. I
> want to riding stepper motor, I have a driver L6203, in one piece of
> this driver there are 2 transistors, so I need 2 this drivers to
> riding one motor. But I want to ride motor as unipolar, so I need 4
> double edge controlled pwm chanels, but procesor allow only 3 double
> edged controlled chanels. When I use single edged chanels, there is no
> chance how to do phase shift, because all single edged pwm channels
> have the beggining at the same moment. I have no idea how to do 4
> times pmw modulation.
> Thanks for all ideas
> Oldik
>

Hi there I have a similar problem but in LPC1759.

I get full phase shifted pwm in pwm mode with PWM2, PWM4 and PWM6 in dual edge mode. PWM1 is single edge by default...

PWM frequency is directed by PWM0 which commands the rising edge of PWM1...
After that I tried to add delay in the symmetric outputs. And it is here that I have a serious problem.
I'm able to add delay to the falling and rising edge of PWM6 in order to avoid simultaneous "on states" between PWM6 and PWM4.
Unfortunately I can't do that in PWM2, I can only add delay in the falling edge because the falling edge of PWM1 and the rising edge of PWM2 are emitted in the same line and for that they are always coincident.

How do you managed to get phase shifted PWM?

--- In l..., "xoldikx" wrote:
>
> Hello to all,
> Im still newbie here, I need help with PWM modulation on LPC2138. I
> want to riding stepper motor, I have a driver L6203, in one piece of
> this driver there are 2 transistors, so I need 2 this drivers to
> riding one motor. But I want to ride motor as unipolar, so I need 4
> double edge controlled pwm chanels, but procesor allow only 3 double
> edged controlled chanels. When I use single edged chanels, there is no
> chance how to do phase shift, because all single edged pwm channels
> have the beggining at the same moment. I have no idea how to do 4
> times pmw modulation.
> Thanks for all ideas
> Oldik
>
Hi there I have a similar problem but in LPC1759.

I get full phase shifted pwm in pwm mode with PWM2, PWM4 and PWM6 in dual edge mode. PWM1 is single edge by default...

PWM frequency is directed by PWM0 which commands the rising edge of PWM1...
After that I tried to add delay in the symmetric outputs. And it is here that I have a serious problem.
I'm able to add delay to the falling and rising edge of PWM6 in order to avoid simultaneous "on states" between PWM6 and PWM4.
Unfortunately I can't do that in PWM2, I can only add delay in the falling edge because the falling edge of PWM1 and the rising edge of PWM2 are emitted in the same line and for that they are always coincident.

How do you managed to get phase shifted PWM?