Originally Posted by
wdmagic
the only reason to use a PWM with a FET would be to control a load such as a light dimmer or motor speed controller. I do this alot with PWMs, not sure about any other PWN settings but if you set HPWM to 255 it will stay high just like HIGH. untill you change it, as the PWM runs at the frequency and rate you set it at untill you change it, and it does this in the background behind any program running, if you make a change to HPWM it adjusts that PWM to the new settings and continues with the program, the PWM continues in the background.
This is great for running lights or motors for brightness and speed if the frequency is set faster than say 40 for lights or 100 for motors, the higher the frequency the more smooth the transistions. if you set the frequency to say 10 hz you will see lights flash on and off and motors will be very jerky. I usually run PWMs at 1khz or more, if used with motors I usually want them above 15khz at at lower freq's they can Whine... also on motors you need to have a reverse voltage diode and capacitor in parallel with the motor for the inductive kick.