I am using an Arduino Nano Every for a project and I need to output a PWM specficially on Pin 9. I was able to get a lot of success using the Arduino Nano and the TimerOne library, but as such, the TimerOne library does not work with the ATmega4809. Is there anything similar to that TimerOne library for the ATmega4809, or will I have to get creative?
Did you try analogWrite(9, 127);
Pin9 is a common ~1kHz PWM pin according to this page.
Fiddling with the timers is only needed when you want a different PWM frequency or resolution,
which you forgot to mention.
Leo..
The great Nano confusion.
OP has a Nano Every with an ATMega4809,
not the original Nano with the ATmega328, or the Nano 33 family with a SAMD21.
When you see "Nano" in a post, then you should always ask which one.
Default Nano Every PWM frequency on pin9 is 976Hz.
Leo..