Brian Jones wrote: > Is PWM just a method of sending out 5 volt pulses. Yeah, Brian... PWM stands for "Pulse Width Modulation"; a PWM signal has a fixed frequency and a varying duty-cycle. > The idea then is to integrate (just did simple op-amp as an > integrator in my 'Electronics for Beginners' night school) these to > get some voltage less than 5v. Exactly. > What considerations are there between pulse width and space width? The integrated voltage is proportional to the duty-cycle (i.e., the ratio of the pulse-width to the sum of the pulse and space widths) of the PWM signal. An example will make this clear: Let's say your PWM frequency is 1 KHz... So you're sending a pulse every millisecond. To get any particular output voltage from your integrator, you just vary the width of the pulses you're sending. If the pulse width is 1 millisecond (i.e., 100% duty cycle), the signal from the PIC is 5V DC and the level coming out of the integrator is also 5V DC (or close to it, anyway). If the pulse width is 900 microseconds and the space width is 100 microseconds (i.e., 90% duty cycle), the level from the integrator is 90% of 5V, or 4.5V. If the pulse and space widths are each 500 microseconds, the integrated voltage is 50% of 5V, or 2.5V; if the pulse width is 100 microseconds, the integrated voltage is 0.5V; and if the pulse width is 0 (i.e., there ARE no pulses coming out of the PIC), the integrated voltage will be 0V. > Is there any good reference re PWM particularly relating to PICs and > especially for this sort of pot type application. Take a look at Microchip's appnote AN538. If you're using a PIC that includes hardware PWM generation, look at AN564, too... It's specifically written for the 17Cxx, but the general idea is applicable to the 16Cxx parts. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499