Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
PWM is a form of signal modulation that allows digital output to approximate an analog signal. Use this for questions about using the PWM pins (marked with ~).
9
votes
Accepted
Arduino PWM malfunctioning
Pin 11 is shared between both PWM and SPI. By activating SPI you've disabled PWM from working on that pin. Either use another PWM pin instead, or switch to software SPI on different pins. …
8
votes
Accepted
PWM signaling with Arduinos: What is the reason for the ground connection?
A PWM signal indicates that we want to apply a certain fraction of full power to a load. … If PWM is a signal, why do we need to connect the Ground from Arduino to the ground of the device to which "PWM signal" is being sent to? …
8
votes
Accepted
Does the square-wave nature of PWM dictate how much resistance you need?
With a PWM signal this duration is directly linked to both the frequency and the duty cycle of the signal. …
7
votes
Accepted
Does millis() conflict with the PWM pins associated with timer 0?
They do not conflict as millis() strictly reads the immediate value in TCNT0 whereas PWM via timer 0 uses the hardware's ability to compare the value of TCNT0 with the values in OCR0x without affecting …
4
votes
can i give a vcc to 14v?
Since PWM pins are digital outputs, the maximum output voltage is VCC. …
3
votes
Simple Speed question - Mapping PWM values
They're the value to pass to analogWrite() in order to generate a PWM waveform with an appropriate duty cycle.
But don't bother writing your own algorithm, just use map(). …
3
votes
Can a timer be used in both CTC and (fast) PWM mode simultaneously?
CTC and PWM are distinct modes of operation. … However, more advanced PWM modes, specifically mode 7 for 8-bit timers and modes 14 and 15 for 16-bit timers, allow specifying an arbitrary timer duration in OCRxA or ICRx while still allowing PWM operation …
3
votes
Arduino PWM Frequency - Pros and Cons of Modifying
A PWM frequency of 490Hz means a period of approximately 2.041ms. This allows a high period of 2ms, which is the maximum pulse length required by a large number of inexpensive servos. …
2
votes
Confusing Arduino Leonardo PWM
Pins 9,10,11 should be working off TIMER 1 which all use the same pre-scaler, so I dont know how 9 and 10 can have one frequency, and 11 have a different frequency.
Unless D11 is configured as OC …
2
votes
Accepted
Switching a dual h bridge in parallel
You can connect a single output to as many input loads as you like, provided the current is sufficient to hold the output voltage within the input thresholds. See the datasheet for the H bridge to fin …
2
votes
Accepted
Is crystal mandatory on attiny84?
Only if you need crystal accuracy. If the internal RC oscillator is accurate enough then feel free to use it instead.
2
votes
Accepted
ATTiny to drive LEDs
The ATtiny85 is an 8-pin AVR device with 3 PWM channels available in DIL and SO packages. The Arduino core can be downloaded from arduino-tiny. …
2
votes
Accepted
32u4 timer 4 pwm frequency help
We need to:
Pick a suitable prescaler to get close to the desired cycle length
Fine-tune the value in TOP in order to get an exact value
Assuming this is a 16MHz Leonardo, and we have Fast 10-bit PWM … |= _BV(CS43) | _BV(CS41);
TCCR4D &= ~(_BV(WGM41) | _BV(WGM40));
TC4H = 624 >> 8;
OCR4C = 624 & 0xff;
And then you set COM4xn and PWM4x to appropriate values for whichever pin(s) you want to output PWM …
2
votes
Why is my interrupt code not working?
On the ATmega1280/2560, only ports B, J, F, and K have pin change interrupt capability. These map approximately to pins 10 through 15, 50 through 53, and A6 through A15 (although part of port J is unm …
2
votes
Accepted
Why can't the OCR1A register be set to 1 to get a 8MHz PWM?
Because then you only have 1-bit PWM. And there aren't an awful lot of applications for 1-bit PWM. …