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
1 answer
Using Pulse Width Modulation (PWM) interface in kernel module
I'm new in kernel development driver and I'm trying to develop a Linux kernel module, using the this module information:
http://lxr.free-electrons.com/source/drivers/pwm/pwm-tiehrpwm.c
But I didn't understand how to use it. How could adapt this…

dczanella
- 1
- 2
0
votes
0 answers
Kernel module driver interaction
I'm new in kernel development. I'm trying to use PWM module from Beagle bone black board from another kernel module that I'm buinding. I have read these article:
https://www.kernel.org/doc/Documentation/pwm.txt
But it isn't clearly to understand. I…

dczanella
- 1
- 2
0
votes
1 answer
Servo on an FPGA
I'm trying to make a servo work on my Spartan-6 based FPGA.
my code is as follows:
`timescale 1ns / 1ps
/*
1 pin for servo--ORANGE CABLE
red cable-- 5V, brown cable-- GND.
Position "0" (1.5 ms pulse) is middle,
"90" (~2ms pulse) is all the…

Cody Friszell
- 27
- 1
- 8
0
votes
1 answer
msp430f2618 fading LED using pwm
I'm trying to write code in C to fade an off-board LED using PWM and the MSP430f2618. I can get the LED to turn on but it stays at full intensity. I am trying to read in an array of frequency values and fade the LED based on the frequency…
0
votes
2 answers
Arduino: Using analogRead() on Photoresistor to read LED with PWM
I have been working on a project with Arduino and have come across something that I find fascinating/confusing. So, I had to test something before constructing this project. I built a simple circuit that consists of just an LED and photoresistor.…

dts
- 121
- 6
0
votes
1 answer
CPLD Breathing LED with flexible set points
This is my first post and my first attempt at using a PLD.
I have written some code to make a breathing LED with 7 set points. The code produces a pwm output according to the first set point. It then slowly increases/decreases the pwm towards the…

Karl
- 1
- 2
0
votes
0 answers
Controlling Fan Speed PWM on Raspberry Pi in Python
I am using Android app to control speed of the fan, by using above mentioned code
I am using GPIO 24 with frequency 50Hz
I want to change fan speed when i change it on Android app on run time
I am using sleep function here, fan turns on, on…

Zain Sheikh
- 21
- 2
0
votes
1 answer
synchronize ADC conversion and measure it in a specific part of a internal pwm signal
I need read my AD inputs only in a specific part of a internal pwm signal. My pwm has a period of 1 ms and initial polarity=low. I know that's possible to synchronize the AD conversion with a internal signal, I want to measure just in the high level…

Jeff Pal
- 1,519
- 1
- 17
- 28
0
votes
1 answer
STM32F4 PWM and interrupt with the same timer
I have a STM32F407x. Is it possible to have a PWM Signal on a Pin and at the same time getting a timer interrupt if the UPPER value is reached? I tried the following code, but I only get once an interrupt (count stays at 1 forever if I use the…

HansPeterLoft
- 489
- 1
- 9
- 28
0
votes
1 answer
Sample program for RPI 3 hardware PWM?
I am trying to use the RPI 3's hardware PWM pin.
Is there a simple Bash script or C program that activates and controls the PWM pin?

kvu787
- 943
- 2
- 10
- 13
0
votes
1 answer
Is NodeMCU's PWM limited to one frequency?
In the NodeMCU doc, it appears PWM on a pin may be set one of two ways, either through PWM or GPIO.
In the PWM doc it says that if you set PWM on one pin for a certain frequency then that frequency is set for all other pins using PWM. This means…

cc young
- 18,939
- 31
- 90
- 148
0
votes
2 answers
ATTiny85 PWM frequency
I'm trying to use the ATTiny85 to control a bunch of LEDs. The LEDs have to be run at around 2Khz ( this is so that it doesn't flicker when being filmed). How would I change the frequency of PWM signals?

Cat Beard
- 11
- 1
- 1
0
votes
1 answer
Verilog: Using PWM to control the brightness of an LED
I am trying to make sense of this example code found here
module LED_PWM(clk, PWM_input, LED);
input clk;
input [3:0] PWM_input; // 16 intensity levels
output LED;
reg [4:0] PWM;
always @(posedge clk) PWM <= PWM[3:0]+PWM_input;
assign…

Broadway
- 3
- 1
- 2
0
votes
2 answers
Reading signal with interrupts using arduino
I am trying to read an input signal from a source that is a PWM signal. In my research I have found some useful articles out found here: http://www.instructables.com/id/Arduino-Frequency-Detection/?ALLSTEPS and here:…

paperstsoap
- 335
- 4
- 13
0
votes
1 answer
Keep the memory to last value of the variable
I am using ESP8266 and i am programming it with Lua language. I created a PWM function and i created a server in ESP8266. I can change PWM duty cycle through this server(You can see figure). First i set to PWM with a default value and i am changing…

ahmd14
- 61
- 2
- 8