Hi Ingvar-

Could this be made to work using the HPWM output & a timer interrupt to output very low frequency sine waves? (< 30hz) Using a lookup table & a variable timer interrupt cycle to vary the sample rate/freq. of the sine? Perhaps amplitude could be varied by scaling the wavetable values?

Was it the case that the PWM output didn't give you a smooth sine at higher frequencies? Or it just didn't work well at all?

Quote Originally Posted by Ingvar

I did some experimenting with DDS a few years ago, i wrote this piece of code. If my memory serves me right, it worked up to 20kHz with reasonable good looking sine on the output. I also did some testing with PWMoutput but never got good results with that, there may be some leftovers in the program from that ...... just remove.
Doing amplitde control is probably too much to ask from a 16F@20MHz but a 18F@40MHz might be able to pull it off.

/Ingvar