0

How to set PWM freq to 62.5Khz on 32u4 Micro?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

How to set PWM freq to 62.5Khz on 32u4 Micro?

by kampto on Fri May 17, 2019 5:58 pm

Lots of info on setting PWM freq's on Mega and Uno but cant seem to find a simple solution for the 32u4. I want to set the PWM freq on Pin 10 to 62.5Khz without messing up the main sketch timer. My use case is a building a Arduino controlled DC to DC buck converter.

Stealing this code from the UNO gets me up to 15.7Khz, where on the Uno it would be 31.3Khz
TCCR1B = TCCR1B & B11111000 | B00000001;

kampto
 
Posts: 98
Joined: Sun Feb 21, 2016 12:51 pm

Please be positive and constructive with your questions and comments.