I have created example SW for you.
My STEP is 250 and modulation frequency is 20kHz.
I have verified it with spectral analyzer. You can use it as a reference.
We do not have reference example for frequency modulation.
You have to calculate STEPSIZE and STEPNO.
From my past experience I recommend you after calculation to use spectral analyzer for manual fine tuning.
Hi Peter, does STEPSIZE need to be non-zero?
If so, then I don't see how the calc can possibly work because with a 40MHz crystal and modulation freq=10kHz --> STEPNO=2000. N would have to be >2000 for STEPSIZE to round to anything other than 0.
What am I missing?