On Tue, 19 May 1998 18:27:00 +0200 Justin Lipton writes: >Hi, > >I am new to the PIC device family and am looking to program a >PIC16C74. > >My application requires 3 PWM outputs (all with adjustable duty >cycles). >Obviously I will use CCP1 for one PWM output leaving me bothered about >the remaining two. > >The other two outputs have frequencies of 30Hz and 70Hz respectively >and >need duty cycles (which will not change very often) of 50% or 10%. > >Can anyone suggest a neat method for implementing these outputs? > I've gotten four 50/60 Hz PWM outputs by letting a timer run and generating an interrupt on a CCP compare match. The interrupt set (or clears) the appropriate output bit, then checks to see which channel is supposed to go on next, loads the CCP with the new value, and returns. On a timer roll-over, all outputs (other than the 100% duty cycle) are turned off. You may have to switch on/off to get the duty cycle going the way you want, but that should give a start... This is used for light dimming phase control in the Shoebox dimmer at http://www.dovesystems.com (sorry, no code or schematics posted there..., just product info). Harold _____________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com Or call Juno at (800) 654-JUNO [654-5866]