Questions tagged [pwm]

PWM (Pulse-width modulation) is a technique for controlling power to electrical devices, made practical by modern electronic power switches.

468 questions
0
votes
1 answer

Controlling a DC motor with a PIC 18 PWM

Im using the PIC 18 microcontroller to control the speed of a DC Motor using PWM. I have managed to get it to spin using the code below. And I have tested that my H-Bridge is 100% functional. However, when I switch on my circuit, 12V to the Motor…
Chris
  • 651
  • 2
  • 10
  • 16
0
votes
0 answers

Pulse Width Modulation (PWM) with Vb.net

I am able to control the output on some pins on a board using a function with Boolean parameters. Would it be possible to use Vb.Net to send PWM signals out?
user2005848
  • 396
  • 5
  • 18
0
votes
3 answers

PWM programming issue in my BBB

Background: Bought a BBB and experimenting a bit, managed to control LEDS and relays. Problem: can't get the expected behaviour from the servo, it keeps spinning CCW Cause: don't know, whey I'm asking here :) Facts: BBB with Angstrom External 5V DC…
user2715922
  • 1
  • 1
  • 1
0
votes
0 answers

Arduino mega 2560 pwm timer controls

I'm trying to use a mirror galvo controlled by a mega 2560 to direct a laser. As a first test I want the laser to move along one axis by jumping equal intervals, but I'm having trouble. I'd like to know whether there are any obvious problems in my…
user2663116
  • 13
  • 1
  • 6
0
votes
0 answers

Arduino motor speed control

I'm using a ANALOG joystick and Arduino to control X,Y motors using two PWM. Each PWM controls the speed of the corresponding motor. Right now it works but its not smooth, I need a exponential function to make it smooth. Need an exponential…
N S
  • 303
  • 4
  • 17
0
votes
1 answer

VHDL-PWM Weird Behavior and Physical Upper/Lower limitations

I am trying to generate picosecond PWM signal using the Spartan 3e board in VHDL (Xilinx ISE+ISim). library ieee; use ieee.std_logic_1164.all; entity pwm is port(clk : in std_logic; pwm_out : buffer std_logic); end…
y33t
  • 649
  • 4
  • 14
  • 23
0
votes
0 answers

How Can I Change Duty Cycle in PWM MSP430G2553 (NO C ALLOWED)?

First of all, I cannot code in C, it must be only assembly. Secondly, I only barely understand assembly, so you may have to dumb it down for me. I am currently working on is changing the duty cycle in a PWM (I believe this will change the…
0
votes
3 answers

Hooking up multiple RGB LEDs while using a minimal number of PWM pins on an Arduino?

I currently have an anode RGB connected to the 11, 10, & 9 PWM pins on my arduino. However I would like to add 3 more LED's to my project, but I don't want to necessarily take up every single PWM pin. Is there a way for me to hook up all 4 LED's…
KingPolygon
  • 4,753
  • 7
  • 43
  • 72
0
votes
0 answers

Using timer and PWM with Arduino

I'm trying to get an LED fading in and out while other code is running, as a nice status indicator. I've asked here how to do this, and I got the suggestion to use the msTimer2 library. This seemed to work, until I tried to use analogWrite in the…
kajdehoop
  • 517
  • 8
  • 22
0
votes
1 answer

variable PWM setting in PIC24FJ64GA002

I am working on project in which I need to display different colors on RGB led. I am using pwm to drive different colors on LED. My Pic is PIC24FJ64GA004 with which I am working on now. Basic concept of this project is to use switch to controls…
user12318
  • 33
  • 6
0
votes
1 answer

Fast PWM and Atmega1280

Hello I have some problems to understand how to bind a Timer to a Pin and because of that my code isn't running... #include void init_PWM(void) { TCCR0A|=(1<
Martin Nikolaev
  • 223
  • 1
  • 3
  • 14
0
votes
1 answer

C /sys/class/pwm init within a program

So you can see in this link that you have a pwm /sys/class/pwm/. So I am currently putting the right data into the appropriate files and things are working well. That is not the issue. The issue is that you need to do a "cat" on the…
napierzaza
  • 439
  • 5
  • 21
0
votes
1 answer

Writing to OC8R/RS causes INT4 to unexpectedly trigger

The title is pretty much self explanatory. When I write to the Output Compare Register (OC8RS or OC8R), an interrupt on the External Interrupt INT4 pin is triggered. I'm using the Timer3 & OC8 modules for PWM. The INT4 pin is connected to a physical…
The_Ders
  • 137
  • 9
0
votes
1 answer

Can't get PWM to work on PIC16F877 (PICC)

I've been trying to use the PWM module on a PIC16F877 MCU but all I get is a flat low level on both CCP1/CCP2 pins. The code configuring and starting the PWM module is the following. // Configure PWM // Timer 2 (PWM timebase) TMR2 = 0; //Clear…
NeonMan
  • 623
  • 10
  • 24
-1
votes
2 answers

play audio with pwm of a attiny85

I'm trying to understand how to implement audio playback from scratch on attiny85. The goal is to play a short sound (cat meows, so i want it to remain recognizable) from an array representing strength of audio signal sampled at fixed interval. As…
Nikolai Savulkin
  • 697
  • 5
  • 12