Need help Conversion Frequency to PWM

Hi,

i need some help for the following conversion:

Input: 0-1500Hz with a duty ratio of 50% (square wave)
Output: 3.9kHz with duty 0-100% (PWM)

any help appreciated !

Thanks
Thomas

Arduino-PWM-Frequency

frequency measurements

https://www.arduino.cc/en/Reference/Map

Thanks groundfungus

Project done :slight_smile:

Thomas