cancel
Showing results for 
Search instead for 
Did you mean: 

PWM for stepper motor

feres_cherif
Associate II
Posted on March 21, 2013 at 23:29

hi all,

please i need help. I have to generate 2 signals PWM like this:

0690X000006037BQAQ.jpg

I think that we should insert a dead time. How to do it plz?
4 REPLIES 4
Posted on March 22, 2013 at 00:14

Set up two timers, with 50/50 duty, and frequency you want. Program the 90 degree phase difference via the CNT register of one timer with respect to the other.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
feres_cherif
Associate II
Posted on March 22, 2013 at 11:07

Thx Clive, i'll try it

feres_cherif
Associate II
Posted on March 22, 2013 at 12:50

Hi Clive, please can you help me ? what is the value of this register (cnt)

Posted on March 22, 2013 at 14:25

If

  TIM_TimeBaseStructure.TIM_Period = 300 - 1;

For Duty

  TIM_OCInitStructure.TIM_Pulse = 300 / 2; // 50% for duty

For Phase

Delta in CNT for one timer vs other will be 75, ie 300 / 4  for 25% or 90 degree phase shift

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..