I can help you with al of the above mentioned Okay first of all pwm does not generate an analog voltage by itself. A pwm signal can however be filtered to make an analog voltage. The PWM command in pbasic outputs a PWM signal jsut like what you need but there is a problem. While the basic stamp is executing the PWM command it can't do anything else. This makes the command useless for your purposes because you will need a steady PWM signal and you can't spend all your time in the PWM command. The easiest way to acomplish this with a bs2 is with Parallax's new
PWM PAL THe Basic stamp plugs into this and allows for PWM in the backgroung while doing other tasks like reading joysticks. Just ask if you need any other help or a mosre specific explanation. I can even write the code and give you a circuit if u need.