Right now I am generating a 24 Hz waveform at 12.5% duty cycle on a T3.1 using
and this works as expected. Now however, it seems that I really want about 23.1 Hz instead of 24 Hz. Is there a straightforward way to get higher resolution at lower PWM frequencies?
EDIT: Nevermind! I didn't realize that analogWriteFrequency takes a floating-point argument. It actually just works.
Code:
analogWriteFrequency(POUT, 24);
analogWrite(POUT, 32);
and this works as expected. Now however, it seems that I really want about 23.1 Hz instead of 24 Hz. Is there a straightforward way to get higher resolution at lower PWM frequencies?
EDIT: Nevermind! I didn't realize that analogWriteFrequency takes a floating-point argument. It actually just works.
Last edited: