Skip to main content

Questions tagged [pwm]

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 ~).

0 votes
0 answers
41 views

I try to use three PWM pins on an Arduino Nano, each with 10kHz. I know that there are timer0, timer1 and timer3 but I wonder if I can combine them while ensuring all three PWM pins to be in sync and ...
Jana's user avatar
  • 1
2 votes
1 answer
219 views

Not sure if this belongs more in an electronics SE, but I'll give this a try. I'm trying to use an ESP32-C3 and an NPN transistor (2N5551) to PWM drive an LED (values below). I'm trying a simple fade, ...
Lorenzo's user avatar
  • 149
0 votes
1 answer
214 views

I'm using an STM32F407ZET6 with the Arduino core support in PlatformIO. CPU has an external 8MHz crystal running at 168MHz. I have a project where I'm already using UART1, I2C1, SPI2 and SDIO (1Hz ...
Joe's user avatar
  • 61
1 vote
1 answer
139 views

I am trying to start a camera firing at a fixed interval on a long servo pulse, stop it firing on the next long pulse, start it again on the next long pulse, etc. I use an interrupt to detect if the ...
Don's user avatar
  • 21
1 vote
1 answer
115 views

I'm using an Arduino Mega 2560 to control a DRV8871 motor driver connected to a DC brushed motor. The setup includes: Three buttons: UP, DOWN, and FAST One limit switch input, where the upper and ...
Luigi's user avatar
  • 181
1 vote
2 answers
100 views

I'm trying to get some C code that runs on a PIC18F, working on an Arduino '328P. It uses an 8-bit timer, PWM, and a LUT to generate sine waves. I hope to get it going using Timer2 on a Nano. The PIC ...
Jim Mack's user avatar
  • 269
1 vote
1 answer
160 views

I am using an ATTiny88 to drive a PWM device. First of all, digging through the literature, it's hard to tell what the differences between the ATTiny85 and ATTiny88 are, and the vast majority of ...
LesRhorer's user avatar
  • 113
-1 votes
2 answers
218 views

How do I create a second output with a different frequency? void setup() { const byte DRIVEa = 3; // Timer 2 "B" output: OC2B pinMode (DRIVEa, OUTPUT); // driver a. TCCR2A = _BV (...
ted thomas's user avatar
0 votes
1 answer
47 views

I have a Nano producing a PWM output from one of its pins. This PWM signal cannot stop as it drives a filament for a VFD display(if it stops, nothing shows). However, I need to capture the pulses from ...
lemon's user avatar
  • 113
0 votes
2 answers
269 views

We can use the function analogWrite(int x) for digital pins which support PWM because any microcontroller has a built in PWM generator.For given x and for Arduino Uno which is the formula to calculate ...
Root Groves's user avatar
1 vote
1 answer
68 views

I'm using a UNO to generate a 10 kHz PWM signal. I need finer duty cycle variation. The prescalers supported are 1, 8, 32, and 64. void setup() { pinMode(3,OUTPUT); TCCR2A = bit (WGM20) | bit (...
Pranav Pillai's user avatar
-1 votes
2 answers
1k views

The op of pin 11 should be inverse of pin 3. I used digitalreadfast and digitalwritefast and used simple if else. But the delay is high as 10us. What should i do? I found this code in forum but its ...
Pranav Pillai's user avatar
-1 votes
1 answer
175 views

I am trying to use an Adafruit PCA9685 servo driver module with an ELEGOO Mega 2560 board. I am supplying the servo driver board with 5 V and tested all the wires to make sure. I tested the servo ...
Blaze48gamer's user avatar
-1 votes
1 answer
167 views

I need to output two PWM signals, one of 50% duty cycle, the other 25% duty cycle, from an Arduino. Feed both signals into the 2 channels of a PicoScope and measure: a) the time difference between the ...
Regan Corban's user avatar
0 votes
1 answer
109 views

I'm trying to generate a PWM signal from TCC1. I have a personnal board built with SAMD21E18A. I want to use pin 27 PA30, in my variant.cpp I have this line: { PORTA, 30, PIO_PWM, PIN_ATTR_DIGITAL|...
simon's user avatar
  • 133

15 30 50 per page
1
2 3 4 5
34