Great explanation! I revised a bunch of articles on how to set up PWM for servos and only here I saw a detailed explanation of how to set up Prescaler, Period and Frequency of TIMx
Great presentation! I have been working on a servo control for about week. I haven't seen anybody do as thorough of a job at explaining these things like you do. I have tried to go through the RM0090 Reference manual for the micro-controller on the discovery board. but get lost. I could use some help to understand how to look at the header files and know just what to use or even how to use it. I find it very helpful to dissect the header file functions down to a reference manual level instruction in order to see why I have to do things that way or this way. Keep up the good work.
can't figure it out why timer_freq = 20000 us * 50 ticks/s = 1MHz ?. Given APB timer clock is 72MHz, set prescalar = 1440, counter period = 1000, and set CCR from 50 to 100, should this work? had examined using oscilloscope, it seems correct, but didn't work for servo. please correct me.
Thanks. I do not think the header files and library functions will work on that board, but I could be wrong. The procedure should be almost identical however.
I'm having a hard time connecting your diagram to what you did in code. isn't ccrx register the value when the counter reaches it turns logic level high? if so that would mean at 600us you are going logic high and staying high for the rest of the period? unless you are starting high and after 600 (0.6ms) going low
Very nice video. I am pretty sure, you have used STM32 for doing other stuffs, not just generation of PWM. Because, if you do so is analogous to using Sword for cutting vegetable.
Hey tony, I had a doubt regarding driving dc motors(not servo, the regular free running ones) . I am controlling them using a joystiick. I want them to have a soft ramp for a few miliseconds and than go into free running mode when I take my joystick to the highest point. Can you clear some of my fundamentals please?
Great explanation! I revised a bunch of articles on how to set up PWM for servos and only here I saw a detailed explanation of how to set up Prescaler, Period and Frequency of TIMx
Great presentation! I have been working on a servo control for about week. I haven't seen anybody do as thorough of a job at explaining these things like you do. I have tried to go through the RM0090 Reference manual for the micro-controller on the discovery board. but get lost. I could use some help to understand how to look at the header files and know just what to use or even how to use it. I find it very helpful to dissect the header file functions down to a reference manual level instruction in order to see why I have to do things that way or this way. Keep up the good work.
This is great work. Perfectly written code and perfect explanation. Hope you post a lot more tutorials. AVR maybe?
Thank you! My prof couldn’t do it, you did!
can't figure it out why timer_freq = 20000 us * 50 ticks/s = 1MHz ?. Given APB timer clock is 72MHz, set prescalar = 1440, counter period = 1000, and set CCR from 50 to 100, should this work? had examined using oscilloscope, it seems correct, but didn't work for servo.
please correct me.
One small mistake. Prescaler value have to be 83 if you want to divide the counter frequency by 84.
I don't know if I missed it but you mentioned you where going to show how to set it up using assembly macro in an earlier movie, did you show that?
Great video thanks. Will the same program using the same header files and lib functions gonna work for my STM32F103....?
Thanks. I do not think the header files and library functions will work on that board, but I could be wrong. The procedure should be almost identical however.
it will work. the drivers are mostly constant across the f series
Great video - thanks!
I'm having a hard time connecting your diagram to what you did in code. isn't ccrx register the value when the counter reaches it turns logic level high? if so that would mean at 600us you are going logic high and staying high for the rest of the period?
unless you are starting high and after 600 (0.6ms) going low
would be great a tutorial but using the hal drivers.
Very nice video. I am pretty sure, you have used STM32 for doing other stuffs, not just generation of PWM. Because, if you do so is analogous to using Sword for cutting vegetable.
I have to controll 4 servos independantly in a project, is that possible? Over the same TIM?
Hi Tiny, You have a link to file srdio.h, and this file doesn't have in github. Where can I get it?
do you not need a circuit with transistor, resistor for that?
Hey tony, I had a doubt regarding driving dc motors(not servo, the regular free running ones) . I am controlling them using a joystiick. I want them to have a soft ramp for a few miliseconds and than go into free running mode when I take my joystick to the highest point. Can you clear some of my fundamentals please?
kind of like how we start the car through first,second,third gear and then completely throttle it at 4th gear
i would say dynamically change the duty cycle in a loop and the duty cycle is equivalent to the joystick output
exactly like yours but mine fails...well actually both.
pwm - not control servo motor
pwm pulse with modulation
hi, i can implemented this code in my stm32f446 nucleo board? with mikroC???
thanks