If you ❤ my content and find it helpful, please Subscribe and hit the Bell 🔔 👇 SUBSCRIBE TO CMTEQ CHANNEL NOW 👇 kzbin.info
@botak3338 ай бұрын
Hi mate, can wi fix the pwm duty cycle is 50% or 70%?? Or if we leaf the pulse to 0 is what happen???
@CMTEQ8 ай бұрын
Yes, you can fix the duty cycle at any value you want between 0 and 100%. If you leave the duty cycle at 0, the signal will be off, zero. If you leave it at 100% , the signal will be 5V continuous
@botak3338 ай бұрын
@@CMTEQ no, i see on the mc workbench is pulse=0 sir. What is that mean?? Because i used for motor control, and i want to fix the pwm on 50 or 70% sir.
@CMTEQ8 ай бұрын
@@botak333 Hi, did you come right with your test for 50% PWM Duty cycle?
@botak3338 ай бұрын
@@CMTEQ i dont know, because the code from x cube mcsdk, that is deferent with code from cube mx sir. In cube mx i can set the ccr, but on mc sdk i see on the code is (pwm_duty) / 2; like that sir. Not the fix number like 1000 or semilar
@iliketrainsguy59183 ай бұрын
I just saw 1/4 video and I'm already serious thinking about subscribing rn, what a nice and useful video, right what I needed
@CMTEQ3 ай бұрын
Thank you, I'm glad it was useful
@richardprogramming940211 ай бұрын
This video was very useful!! Thanks!!
@CMTEQ11 ай бұрын
You are most welcome !
@tomas_soeterik10 ай бұрын
Very good video, underrated in every way, ai needed some explanation on pwm
@CMTEQ10 ай бұрын
Thank you for your feedback. Please support by sharing, much appreciated 🙏.
@BillyChrist-r2k8 ай бұрын
Your content is great, but just ONE reminder about like/subscribe somewhere in your video is all you need. Having random animations appear over your video with tones takes away from your content! Anyways, your work here has saved me many hours of research, and I am a happy subscriber!
@CMTEQ8 ай бұрын
Hi William, Thank you for the feedback, well Noted.
@johnfrancis9237 ай бұрын
In my case, I am using an external oscillator to generate the system clock. However, I'm not finding an option to select the external clock as the source. What should I do? i am using cubeMX tool to configure?
@CMTEQ7 ай бұрын
Hi, I will have a look later. Please check my video on clock configuration. kzbin.info/www/bejne/eYbKgYuqaa94lcU
@ashleed680010 ай бұрын
Are the terminals from GND (black wire) and PWM/D11 (red wire) both directly connected to the oscilloscope? What is your wiring set up?
@CMTEQ10 ай бұрын
Yes that is correct. I'm doing a simple GND reference measurement. Scope croc clip connected to GND(Black Wire) and Scope Channel 1 (Yellow) probe connected to Red wire D11.
@ashleed680010 ай бұрын
@@CMTEQThank you so much! I am currently using PWM for this STM (and this code) and with Escon 50/5 motor driver. What wiring set up would you recommend? I connected PWM/D11 to the Input PWM pin on Escon. What about the ground & power supply connections?
@CMTEQ10 ай бұрын
Hi Ashlee, if your Escon 50/5 motor driver and stm32 board are sharing the same power supply then you can connect your Escon 50/5 motor driver GND to the same GND black wire on your stm32 or on your power supply, while keeping the PWM Pin connected on the Escon PWM input. You should be able to control your motor. If you need more assistance, like schematic and hardware connection, you can consider joining my low voltage membership, I will provide you technical assistance.
@ashleed680010 ай бұрын
@@CMTEQ I will look into your membership! Thanks again. :)
@botak3337 ай бұрын
hi mate how about like this??? Code: htim1.Init.Period = ((PWM_PERIOD_CYCLES) / 2); Code: sConfigOC.Pulse = (uint32_t)(((PWM_PERIOD_CYCLES) / 2) * 0.6); It will working?? So no need set pwmc setphasavoltage, because global pwm duty (pulse) already set max 60%?? Or this will set all tim for 60% sir?? Any idea?? Thank u@@CMTEQ
@mohamedansari_stm8 ай бұрын
Fantastic video mate !! . What should be the prescaler and period value if i want to have a frequency of 400khz?
@CMTEQ8 ай бұрын
Hi thank you for your feedback. If you want to generate a 400kHz frequency you just need to play with the Prescaler and period value, I mentioned it in the video. So for 400kHz you can setup your values as follow prescaler = 20 and period = 7. depending on measuring equipment you might not get the exact 400kHz, if thats the case you can decrease the prescaler = 19. Please note that this is based on the 64MHz clock frequency if your frequency is higher or less than you just need to play with the period and prescaler value until you get your desired frequency,.
@mohamedansari_stm8 ай бұрын
Mate.. You are the best, This is the most underrated channel ever@@CMTEQ . I have achieved 400khz freq. THanks to you. Now i am trying to create a function that gets uint32_t input data from user and converts into pwm signals with logical 1 having 70% high and 30% low and logical 0 -vice versa. Can you help me?
@CMTEQ8 ай бұрын
That sound very easy to implement. I'm not sure which method you gonna use to get user input, buttons/keyboard etc... But you can first create a function that increment your uint32_t var locally and pass it into your Timer Init function to change the duty cycle value. Once you have that working you should see your pwm duty cycle change automatically as the code runs. Once you are satisfied you can then get the value externally by a user, sound like a nice project, an LCD would be a great addidtion to see whats going on. Time is always an issue, the best way to get assitance fast is by become the channel member.
@lenzneethling31647 ай бұрын
Very helpful !!
@CMTEQ7 ай бұрын
Great 👍, I'm glad it was helpful
@shamilsha76188 ай бұрын
Can we shift the pwm sideways by 50% of the counter period?
@CMTEQ8 ай бұрын
Hi, by sideway I believe you mean shifting left or right, leaving the Frequency and period fixed, you can probably achieve that by playing with the Duty Cycle, you can either halve or double the high time. Try playing with those values and see what you get.
@STrAnGeR78510 ай бұрын
can you please share the code
@CMTEQ10 ай бұрын
Hi, I have attached the main.c file under the video description. Try to follow the tutorial you should be able to produce the same PWM signal.
@kylekingsberry5680 Жыл бұрын
The pulse width wasn't being modulated here lol you just showed how to generate a square wave.
@CMTEQ Жыл бұрын
Hi, Thank you for your humorous comment. A square wave is a PWM signal with a constant duty cycle and amplitude. More control can be introduced, like changing the duty cycle periodically in the code to achieve the desired modulation.
@CMTEQ Жыл бұрын
Analyze PWM signal using SIGLENT SDS 1104X-E Digital Storage Oscilloscope kzbin.info/www/bejne/Y4GkYZ-oaKysd7M