PWM (Pulse-width modulation) is a technique for controlling power to electrical devices, made practical by modern electronic power switches.
Questions tagged [pwm]
468 questions
-1
votes
1 answer
Microcontroller stops responding after accessing registers of uninitialized peripheral
I am working on ARM cortex M3 processor. After accessing MCPWM register controller stops responding in which no interrupts will work.
Intentionally I have not initialise MCPWM.
So i wanted to know, where actually code flow(Program counter) goes,…

subodh
- 9
- 1
-1
votes
1 answer
Read PWM Signal from Pixhawk to Arduino
I tried to read a PWM signal from Pixhawk by connecting it to Arduino.
The Pixhawk is connected to FrSky X8R. But my PWM always reads to zero.
Here's my arduino code
#define RCPin 4
int RCValue;
void setup() {
Serial.begin(9600);
…

Melon Streams
- 60
- 6
-1
votes
1 answer
I'm getting an syntax error in my VHDL code near counter
I'm trying to simulate a pulse width modulate (PMW) waveform generator and getting a syntax error in ISE. Checked fuse.xmsgs and found out it's near counter. Can someone point out the syntax error, please?
library IEEE;
use…

Jason Jackobs
- 3
- 1
-1
votes
1 answer
How do I fix my code to make an LED blink on an STM32 Nucleo Board in sync with 1sec, 50% duty cycle PWM?
My board is the NUCLEO-H743ZI2
I configured TIM4,CH2 as PWM such that TIM4 output should be HI for half a second and LO for half a second. Here is the block.ioc clock and pin configuration
I auto generated the code and tried to add my own to…

user P520
- 317
- 2
- 10
-1
votes
1 answer
pi.hardware_PWM() not works together with flask IntegerField nor StringField
I have to use pigpiod, pi.hardware_PWM() as it gives me beautiful squrewave.
I've created a webserver, in which I use flask and flask-wtf. I fetch the number from the user with IntegerField, which I would like to use as a PWM control number.
However…

Zoltán Gál
- 25
- 3
-1
votes
1 answer
How to make this for loop both dim and brighten the LED?
I have a for loop made by my teacher that dims (or brightens) an LED connected to a PIC18F2455. I have to make the code do both, first brighten, then dim it, but my C skills aren't good enough for this. How can I make this happen?
int…

Underi
- 1
- 1
-1
votes
1 answer
cant recall [HAL_TIM_IC_CaptureCallback] when getting PWM by stm32F746
I want to get DutyCycle of PWM use stm32F746G. I did the the code like the hal PWMINPUT sample. Now the program cant go into [HAL_TIM_IC_CaptureCallback] function.
#include "main.h"
#define max(a,b) ( ((a)>(b)) ? (a):(b) )
#define min(a,b) (…

云鹏赵
- 33
- 1
- 9
-1
votes
1 answer
how to generate PWM after a sine in simulink?
I need to generate a PWM signal with duty cycle after a sine. How I can do this in simulink and after this to simulate on a microcontroller F28027 PICCOLO ?

user
- 9
- 1
- 6
-1
votes
2 answers
arduino servo is moving randomely
i have amg996r servo and an arduino mega. when i am running the sweep example from the arduino servo library the servo is moving almost randomly, looks like it moves toward the desired position and before reaching moving back to 0 degrees(altough it…

guy
- 40
- 7
-1
votes
1 answer
TSMP77000 IR Receiver Code
I'm using tsmp77000 IR Sensor module for air conditioner remote control system.
datasheet
I instructed remote controller device of the air conditioner to sensor module and i saw voltage outputs(active low) on the oscilloscope. Then, i need to…

kbtr
- 1
- 1
- 3
-1
votes
1 answer
wouldn't pwm cause uneven motor motion?
I mean basically the PWM is causing the motor to run, stop, run, stop, run, stop at different intervals, wouldn't it make a very uneven ride>?

user97662
- 942
- 1
- 10
- 29
-2
votes
1 answer
stm32 with pin PWM capable : datasheet?
I want to build a project with an STM32G070.
I need a couple of PWM pins.
I look at the datasheet and user manual, and I cannot find anywhere if all pins of if only some are PWM capable and so, which one it is.
I want to know because, if I look at…

Nitrof
- 121
- 1
- 3
- 15
-2
votes
1 answer
How do I make pwm signals with arduino ide without useing analogwrite?
Hi can someone help with crating a pwm(or very similar) signal without analogwrite on the Arduino IDE because analogwrite wont work on the esp32.
And without using a library.
I need it to take values from 0 to 255.
I was thinking to use the second…

RedRaptor
- 92
- 6
-2
votes
2 answers
Variable frequency PWM on ESP32
I have been working on the following project that was created by Rui Santos and wanted to make some modifications.
ESP32 Web Server Slider
In the code the frequency is set constant and the duty cycle is adjustable with a slider. I would like to add…

dylanjobson
- 9
- 3
-2
votes
1 answer
PWM/PPM Output misses some edges
I am using ESP8266 (NODEMCU 3.0 or something) to make a quadcopter. Ive connected ardu pro mini to RC receiver so I am reading PPM values from it. Pro mini sends data with tx to ESP8266. ESP reads it with software serial with 115200 baudrate. I am…

Kamil Słotwiński
- 69
- 8