As for determining the PWM duty cycle, all you have to do is get the voltage you want (1.2 volts) and divide it by the number of volts you have (5 volts) and that will give you the PWM duty cycle that you need. 1.2/5 = .24 which you then have to scale to the proper 8 bit value - which means multiplying by 255. So .24*255 = 61 (which is 3D in hex). So write 0x3D into you duty register and tweak from there (assuming a 5 volt supply).
A single-pole, low-pass filter will pass frequencies lower than about 1/(2*PI*R*C). But it's not quite that simple since the resistor you use for your low-pass filter will rob your motor of current that it needs to run - and if you lower the resistance in your filter so that it doesn't block current, then the resistor will start wasting power as heat. Usually you would use an inductor instead of a resistor since it doesn't consume power - but conveniently, there is already an inductor in the motor since it uses a coil of wire to generate a magnetic field. So the motor itself already acts as a low pass filter. There exists a threshold in PWM frequency such that the inductance and ESR of the motor will do a nice job of smoothing out the pulses without a filter. The more inductive the motor is, the lower the PWM frequency you can use. But that inductance will also send out transient voltage spikes back to your motor driver - so you should use catch diodes or transient voltage suppressors if necessary. But it sounds like in your case, you have a tiny motor and you probably don't need anything too crazy. What I would do is connect the motor to a function generator and an oscilloscope and see what PWM frequency gives a smooth voltage, then measure how much current the motor wants to use. Then you can select an appropriate motor driver if you haven't already. I would be more concerned with burning the microcontroller's PWM port than I would be about burning out the motor. But that depends on how much current the motor is asking for. If it's well within the uC datasheet's specifications, then you are probably fine. You maybe should still use a catch diode on the microcontroller port so the PWM pin doesn't try to go too far negative. Again, an oscilloscope would help you determine whether or not you are being mean to your microcontroller.
If you're interested in efficient voltage conversion, try an Internet search for a "Buck Converter". It's a very simple circuit, and there are lots of websites that explain it very well.
Message Edited by rhinoceroshead on 05-10-200604:46 PM