can anyone help me to make a sine wave of 6 Hertz with pwm?
i am using 16F886 with 16MHz crystal(any crystal can be used)
how to decide the pwm frequency and look up table ?
Of course it's possible. PWM frequency is primarly independent of sine frequency, except for the fact that it must be high enough to be filtered with acceptable effort.
The sine generation will be basically identical either if you use PWM or a DAC for analog output signal generation. You have to decide for a table size and word width based on signal quality requirements and available PWM/DAC resolution. For the table index generation, a NCO/DDS scheme as suggested by horace1 will be beneficial in any case, particularly because it offers effectively unlimited frequency resolution.