Hi,
2.2kHz (Output_x = 28835) should work. The higher you go the more jittery the output becomes.
If you want to calculate the value to put in the Output_x variables at runtime (instead of using a lookup table or whatever) you can do it with Output_x = ( Frequency + ( Frequency ** 20353 ) ) where Frequency is a WORD containing the desired output frequency * 10, (4400 = 440.0Hz)
It's not perfect but may be good enough.
Let me know if you get around to trying it.
/Henrik.
Bookmarks