weesiang_loke:
ok... so what i am doing is to use arduino to generate the fixed frequency of pwm with different pulse width to generate the sine wave. Then channel them to drive a dc motor (custom made motor) which will 'oscillate' about 40 times in a second. I am not sure if any other frequency and pwm will work on the motor. So i have to stick to 40 Hz and 5kHz. Later i may want to add a remote control device to change the amplitude and frequency of the sine wave. so i think the analogWrite() is not so useful and timerOne only for timer1. So i guess my best option is to use fast pwm mode.
What does an 'oscillating DC motor' do in operation? I haven't ever heard of that mode of operation.
Lefty