15. STM32CubeIDE LED FADE. PWM Timers with STM32F103C8T6

  Рет қаралды 17,628

MicroPeta by Nizar Mohideen

MicroPeta by Nizar Mohideen

Күн бұрын

Пікірлер: 25
@NizarMohideen
@NizarMohideen 2 жыл бұрын
This video is for very beginners without code explanation. I have made another video about this topic with bit more details in video no - 70 in this channel kzbin.info/www/bejne/nZCYk2aYpryXmJI
@ulyssecordier
@ulyssecordier 2 жыл бұрын
It works very well. Thanks for this tutorial. I subscribed in case you make new videos, you stopped for 4 months, it's a shame. I hope you will be able to resume because I love your work. Best wishes !
@vigneshwaransaminathan6418
@vigneshwaransaminathan6418 3 жыл бұрын
Superb Sir! Really Helpful.
@NizarMohideen
@NizarMohideen 3 жыл бұрын
Glad to hear that
@DS-ls7ck
@DS-ls7ck 3 жыл бұрын
Thanks a lot. It is really simple. How can I make pwm with adjustable frequency and duty cycle?
@NizarMohideen
@NizarMohideen 3 жыл бұрын
In this example I wanted to have 100Hz with 0-100% variable duty cycle. How I did is: Clock frequency = 8000000Hz I divided it by 128 (prescaler) and then divided it again 625 (Counter period) to get 100Hz Follow this to get different frequency as you wish. I am adjusting duty cycle on the fly using __HAL_TIM_SET_COMPARE in the for loop from 0 (0%) - 625 (100%)( Counter period) Note : prescaler is always one less 128 is 128-1 =127
@NizarMohideen
@NizarMohideen 3 жыл бұрын
If you want to set the frequency on the fly you can use __HAL_TIM_SET_AUTORELOAD as I did in video kzbin.info/www/bejne/sKiUnoSLfpemia8
@LabSkaterPussies
@LabSkaterPussies 2 жыл бұрын
@@NizarMohideen isn't it the other way around? The prescaler is the same but the counter period is -1 because it starts at 0?
@NizarMohideen
@NizarMohideen 2 жыл бұрын
You can use other way round, it will generate pwm. But the counter period needs to be more than 1 (one) in order to have variable pulse width from 0-100%
@matovupaul4942
@matovupaul4942 Жыл бұрын
You setting the prescaler and ARR but you don't even explain why you using those values
@ultralaggerREV1
@ultralaggerREV1 2 ай бұрын
What would i change in the code to make it blink instead of fade?
@NizarMohideen
@NizarMohideen 2 ай бұрын
Set Pin PA1 as GPIO_Output as shown in kzbin.info/www/bejne/oYnKZWlto7uXlaM for Pin PC13 then on for 500 milliseconds as off for 500 milliseconds HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1, 1); HAL_Delay(500); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1, 0); HAL_Delay(500);
@BechirZalila
@BechirZalila 3 жыл бұрын
Very good work. Thank you!
@NizarMohideen
@NizarMohideen 3 жыл бұрын
Glad you liked it!
@kenz0292
@kenz0292 Жыл бұрын
Why My led just blink, cant fade... When i connect led to 3.3v voltage it can on
@andrey__shintar
@andrey__shintar 2 жыл бұрын
Why i can't use this code with L293 motor shield? I've been trying to control the speed of DC motor 3V-6V. Please, help
@NizarMohideen
@NizarMohideen 2 жыл бұрын
Hi Andrey, I don’t have L293 with me. I have done L298N motor control in video no 20 in this channel. I hope it gives you a stepping stone
@andrey__shintar
@andrey__shintar 2 жыл бұрын
@@NizarMohideen Hi Nizar, thanks! I will watch it and try
@xlalbuquerque9705
@xlalbuquerque9705 3 жыл бұрын
I'm looking for the library to PHOTO SENSOR VEML6040 RGBW 16-BITS I2C, I would like to know where I can find the libraries to use in CubeIDE. Could you please help me? thank you so much, yours videos are helping me a lot.
@NizarMohideen
@NizarMohideen 3 жыл бұрын
I am sorry I don’t have VEML6040 with me at the moment.
@구승모-j1t
@구승모-j1t 3 жыл бұрын
What is doing __HAL_TIM_SET_COMPARE() Functions?
@NizarMohideen
@NizarMohideen 3 жыл бұрын
Hi there, Since we set Configuration → Parameter Settings → Counter Period 625, we can change Pulse from 0 to 625. 0 being 0% and 625 being 100% pulse width. __HAL_TIM_SET_COMPARE() is a macro to set the pulse on the fly.
@venkannababu5752
@venkannababu5752 3 жыл бұрын
thank u soo much sir
@NizarMohideen
@NizarMohideen 3 жыл бұрын
Most welcome
@anakarinaramirez5401
@anakarinaramirez5401 2 жыл бұрын
GRACIASSSSSS
STM32: PWM шаг за шагом на STM32CubeIDE
10:51
G1Tech
Рет қаралды 29 М.
STM32 PWM на практике.
9:50
Vladimir Medintsev
Рет қаралды 19 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
75. STM32CubeIDE FreeRTOS Simple LED Blink with STM32F103C8T6
7:35
MicroPeta by Nizar Mohideen
Рет қаралды 18 М.
19. STM32CubeIDE OLED Display. I2C with STM32F103C8T6
8:41
MicroPeta by Nizar Mohideen
Рет қаралды 39 М.
WS2812 LED with STM32 || PWM using DMA
29:18
ControllersTech
Рет қаралды 53 М.
How to Fade an LED with Arduino analogWrite (Lesson #6)
11:13
Science Buddies
Рет қаралды 43 М.
#8 CubeMx ile STM32F103 Programlama - PWM Sinyali
13:55
Gömülü Mühendis
Рет қаралды 18 М.
Why Japan’s Outlets are Safer than USA
12:32
Andrew Lam
Рет қаралды 2 М.
14. STM32CubeIDE button. GPIO INPUT with STM32F103C8T6
5:38
MicroPeta by Nizar Mohideen
Рет қаралды 17 М.
How to program a PIC microchip?
6:55
ezContents
Рет қаралды 20 М.
STM32F103C8T6 PROGRAMLAMA | KOD YÜKLEME | STM LİNK V2(Klon)
5:37
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН