I have attached the schematic and the full code for the PWM motor control. Both are available under GPL V3.
The schematic was developed using KiCAD.
Best regards,
Steve
/* Written by Steven E. Stock who retains all Copyrights, released 8-1-2021.
This program is free software: you can ...
Search found 5 matches
- Mon Aug 02, 2021 1:56 am
- Forum: General discussion
- Topic: how to PWM Frequency stm32duino and resolution
- Replies: 19
- Views: 45550
- Sat Jul 31, 2021 12:27 am
- Forum: General discussion
- Topic: how to PWM Frequency stm32duino and resolution
- Replies: 19
- Views: 45550
Re: how to PWM Frequency stm32duino and resolution
Greetings, ABOSTM, you are my hero today. I now have a working sketch which I will post here for any others who have an issue with getting more than one PWM going and need a known good example.
I've attached a screen shot from my scope showing the two PWM signals alternating from 10% duty to 90 ...
I've attached a screen shot from my scope showing the two PWM signals alternating from 10% duty to 90 ...
- Fri Jul 30, 2021 12:15 am
- Forum: General discussion
- Topic: how to PWM Frequency stm32duino and resolution
- Replies: 19
- Views: 45550
Re: how to PWM Frequency stm32duino and resolution
You can try this instead of analog API:
HardwareTimer examples for PWM:
https://github.com/stm32duino/STM32Examples/blob/master/examples/Peripherals/HardwareTimer/All-in-one_setPWM/All-in-one_setPWM.ino
https://github.com/stm32duino/STM32Examples/blob/master/examples/Peripherals/HardwareTimer/PWM ...
- Wed Jul 28, 2021 11:15 pm
- Forum: General discussion
- Topic: how to PWM Frequency stm32duino and resolution
- Replies: 19
- Views: 45550
Re: how to PWM Frequency stm32duino and resolution
I found my answer in a post made by fredbox (Thanks!) and here is the working test program with the new stuff for the next person who has this trouble:
#include<Wire.h>
#include <LiquidCrystal_I2C.h>
#define pwm_pin PB9
long int loop_cntr;
LiquidCrystal_I2C lcd(0x27, 20, 4);
TIM_TypeDef ...
#include<Wire.h>
#include <LiquidCrystal_I2C.h>
#define pwm_pin PB9
long int loop_cntr;
LiquidCrystal_I2C lcd(0x27, 20, 4);
TIM_TypeDef ...
- Wed Jul 28, 2021 10:52 pm
- Forum: General discussion
- Topic: how to PWM Frequency stm32duino and resolution
- Replies: 19
- Views: 45550
Re: how to PWM Frequency stm32duino and resolution
You can try this instead of analog API:
HardwareTimer examples for PWM:
https://github.com/stm32duino/STM32Examples/blob/master/examples/Peripherals/HardwareTimer/All-in-one_setPWM/All-in-one_setPWM.ino
https://github.com/stm32duino/STM32Examples/blob/master/examples/Peripherals/HardwareTimer/PWM ...