I need to come up with a sine wave generator from 300Hz to 1,600Hz (100Hz steps) mainly for short beeps alerts. I see many suggesting buying DAC IC's but imports in my country are complex, time consuming and almost always taxed at 60%. Based on requiriments below, do you think I can get away using an atmega64a's PWM?
* I don't need to be very precise. 995Hz to 1.005Hz is good enough as 1.000Hz to me.
* Stability is not so important since nobody will notice if the frequency changes little with each alert which are occasional.
* Amplitude should not change too much. Let's say no more than 10%.
* Spectrum purity is desirable because it will be transmitted over the air (FM).
My first try was a square wave oscillator and converting to sinewave with RC filters. But there ate too many harmonics and it will take many extra components to clean. Looks like there is ways to generate relatively clean sinewaves with PWM.
I would much appreciate suggestions and even better codes examples.