How DualPWM works part 2 - How to configure faster PWM on an Arduino and resistor values. @SourceryOne
How DualPWM works part 2 - How to configure faster PWM on an Arduino and resistor values.  @SourceryOne
Uploaded August 2024 | Updated November 2026, 1 day ago
In this video I go through TWO of the THREE steps needed to get a good 16bit "analog" output from an Arduino. It is a very theory dense video about registers and binary math. If you are interested in just how to set the registers to get faster PWM check the chapters, and the Cheat sheet.
This is the second video about how DualPWM works, where the first video I showed how it works, and in this video we dive deeper into how to configure the Arduino to get a better analog signal out. We do this by speeding up the PWM frequency outside of the hearable range with register manipulation, and by tuning the resistors for the two pwm outputs so there is a good ratio between the two. In the next video I will show how to filter the signal to get the final actual analog output.

Cheat Sheet for setting the TCCRnA/B registers: docs.google.com/spreadsheets/d/1C0q_IB5QaT36SNPkw4a2zEetK-U1r_IYP37szSlvJeU/edit?usp=sharing

The simple code with a lot of comments:
github.com/SourceryOne/PWM-register-manipulation/blob/main/dual_pwm_register_manipulation.ino

Secrets of Arduino PWM: docs.arduino.cc/tutorials/generic/secrets-of-arduino-pwm

AtMega328P Datasheet: ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf

Modular in a Week playlist:
youtube.com/playlist?list=PLyE56WXw0_5Q5QGMEXWmskuhojKyRdA3T

My Tindie store:
tindie.com/stores/Sourcery

Support my work by becoming a Patreon:
patreon.com/SourceryOne

Join the discussion on the Discord server: discord.gg/pZtVheVCTW
How DualPWM works part 2 - How to configure faster PWM on an Arduino and resistor values.Grenar build video (new version without the trimpots)Fuzzface - Modular in a Week 13.3SITH Mayhem Jam with four MiaW S&H modules.I got the attack and decay working. Sustain and release needs some more work. :) #sdiy #arduinoModular Advent Calendar door 16 - Zener noiseModular Advent Calendar door nr 3 ;)Controlling two alternate leds with one pin #arduinoJamuary 2026 - 4 Technoish...Super simple spring reverb - Modular in a Week 12.1Modular Advent Calendar door 24 - simple storage improvementMore fun with Track&Hold. #diymodular #s&h #miaw #modular
Kristian Blåsol |

How DualPWM works part 2 - How to configure faster PWM on an Arduino and resistor values.

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER