ATmega 4809 I would like to achieve a PWM frequency of 25Khz

Thread Starter

KKRS_

Joined Oct 26, 2023
24
Hi, I am programming this chip on an Arduino Nano Every development board. I would like to achieve a PWM frequency of 25Khz with variable duty cycle. I focused on the TCB1 timer so as not to distress the functions (millis(),delay(),etc). But I cannot generate such frequency. Does anyone know how to do it?
 

BobTPH

Joined Jun 5, 2013
11,463
I once programmed a PIC to output PWM at 1MHz. Only three duty cycles were available (0%, 50%, 100%) at that frequency. I modulated it between 0 and 50% at 1000Hz, and could pick up the tone in an AM radio.
 
Top