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
0
votes
2 answers
Read RC PWM signal using ATMega2560 in Atmel AVR studio
I am trying to read several PWM signals from an RC receiver into an ATMega 2560. I am having trouble understanding how the ICRn pin functions as it appears to be used for all three compare registers.
The RC PWM signal has a period of 20ms with a…

deanshanahan
- 318
- 5
- 14
0
votes
1 answer
ADC through PWM signal problems
I am using an STM32F100RB at the moment and I am trying to read a value from a potentiometer and to display it through the PWM signal. The problem I have is where I am connecting them I think. The PWM signal is generated through this…

Alex
- 97
- 1
- 13
0
votes
2 answers
Sofware pwm as linux kernel module
I need to implement PWM-module for linux kernel, it should be high resolution ( will be cool more than 10kHz on my 400MHz ARM cpu)
Can anyone give me an advice, what I can use for that purpose?
Kernel version is 2.6.28.9.
Device hasn't a harware PWM…

Dcow
- 1,413
- 1
- 19
- 42
0
votes
1 answer
Why I am always getting Zero PWM output?
I want to output two different analog values with 10 bit resolution i.e. dac_value ranging from 0-1023. I am using ATmega16 with external crystal 4MHz. I have also tried connecting RC filter at output but nothing changed.
I am constantly getting…

Yash
- 145
- 9
0
votes
1 answer
Arduino - PWM MOSFET?
I have a bit of a problem that in hoping someone can shed some light on.
I have a 4 wire fan (from a power mac g5) and I found that the pinout is positive, negative, PWM and rpm output.
It's a bit strange in that the 12v must be connected constantly…

DerekOS
- 57
- 1
- 9
0
votes
0 answers
attiny85: example of OC1B/!OC1B output?
I have a piezo transducer hooked up to 2 of my attiny85 pins, and I'm driving it via software in AC mode @4khz using a timer and interrupt.
I would like to switch this over to a hardware solution (no interrupt) using OC1B/!OC1B (PB4,PB3), but I'm…

protoc0l
- 1
- 1
- 1
0
votes
1 answer
Pulse Width Modulation using VHDL
I'm trying to create a PWM generator using a 100khz clock and PWM ranging from .6ms to 2.4 ms but I'm stuck implementing this into vhdl I've been trying to use a state machine to do this but it has become more complicated than it should.
library…

zach thomas
- 1
- 2
- 2
0
votes
0 answers
PWM controll on digital pin 3 Arduino Due (C)
I'm trying to control a fan on my Arduino Due board with Arduinos own motor shield and I have encountered a problem. I want to send a PWM signal to my fan, and here comes the problem, pin 3 is channel less..
What I can find there is no channel for…
0
votes
1 answer
performing infinite loop while awaiting input
I have a little project I'm working on, it's fairly simple so I'm hoping someone can help me.
I'm using a raspberry pi to dim a single LED with some very crude PWM.
my PWM code looks like this:
import RPi.GPIO as GPIO
import…

Byron Hill
- 11
- 1
- 6
0
votes
1 answer
STM32F4 PWM ramp
I'm working on a project where I want to ramp the pwm duty cycle from 0 to 50%. My period is 16000 counts or 1ms (16MHz default timer count). For some reason, instead of updating the duty cycle each period, it updates it much slower. I wonder if…

oboist B
- 1
- 4
0
votes
2 answers
Using 4 16bit timers for 400hz PWM
I'm dealing with arduino mega based quadcopter and trying to make PWM frequency for 4 motors - 400hz each. I've found an interesting solution where 4 ATmega2560 16bit timers are used to control 4 ESCs with PWM so it could reach 400hz frequency. 700…

user3081123
- 425
- 6
- 15
0
votes
1 answer
PWM read with Arduino MEGA and Ethernet Shield
I'm on a project in which I must read the DC (1ms-2ms) of 16 PWM signals with 4 Arduino MEGA 2560, 4 PWM for each one. After have read it, I should send the 16 values to a computer. The initial idea was to use 4 Arduino Ethernet Shield connected to…

user2956741
- 11
- 6
0
votes
1 answer
How to make a block force a simulation step to occur at a given time?
Question
Is there a way to make a block force a simulation step to occur at a given time(s)?
For instance, even though the user chose a simulation step size of 1e-2 in his model (fixed-step simulation), if he uses my block then a simulation step…

JLagana
- 1,224
- 4
- 14
- 33
0
votes
1 answer
Arduino Uno same frequency on ALL PWM pins
I'm controlling a BLDC motor with an inverter/driver IC doing the switching work.
I need to provide 6 PWM signals for the driver all at the same frequency. The exact frequency doesn't really matter, as long as its between 5kHz to 10kHz and all the…

Pato88
- 1
- 1
0
votes
1 answer
CCP module - PWM mode
I'm trying to make a PWM output with this code, but apparently something is missing. Because when I check the Logic Analyzer in MPLab, nothing happens on CCP2 output. I'm working with the pic18f25k80.
void main() {
// Set up PWM
CCP2CON =…