Hi Dave, Frequency and Period are the same thing (just one is an inverse) but you know that. I think what you are trying to say is that the PWM frequency into the two CCP modules is the same; the manual says they have the same frequency and update rate. What you can do is vary the on/off ratio independently. You set up the PWM frequency with the Timer Prescaler and the PR2 value. Then you control the Duty Cycle (The time the bit is on) with the CCPRxL and CCPxCON<5:4> bits. Table 8-3 has a set of values for the Frequency from 1.22KHz to 208.3KHz with a 20MHz CPU clock. You can then fill the CCPRxL register with 0..255 and leave CCPxCON(5:4> 0 to have 256 possible PWM widths. Cheers, John Wireless CAN with the CANRF module. http://www.autoartisans.com/documents/canrf_prod_announcement.pdf Automation Artisans Inc. Ph. 1 250 544 4950 > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Dave King > Sent: Wednesday, July 10, 2002 12:44 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: [PIC] PWM in background > > > Hi > > I was rtfm'ing and read something about HPWM in PicBasic. It > is a method to set > and forget the pwm output. Once its setup it runs in the > background and you can > ignore it until it changes from what I understand. > > The one pic it mentioned that this worked on was the 18C452. > I was looking at > the spec sheet at it is far more chip than I need for my > current project. The > problem is that I can't find any other pics that support this > background > pwm or > hardware pwm. I'm not even sure what else to look for on > microchip as a couple > of hours tonight resulted in zilch. > > I need to produce three different pwm streams at the same > time with a high and > low pwm rate on each. In the mid mcu ref it says since the > ccp is based around > timer2 if you have more than one pwm stream they will have > the same frequency > and period. First thing is if I have that interpreted > correctly? I need 3 > distinct pwm > outputs and this would not allow them to differ? > > I also remember someone posting about something similar a > year or so ago and > the suggestion was to just out put binary strings instead of > actual pwm. > This might > work too as my timing isn't terribly critical. > > Anyone have any suggestions on where to look for more info? > I'm reading > everything > I can find but nothing is making sense so far. > > Dazed and confused ;-] > > Dave > > > > > > > > > The only thing that helps me maintain my slender grip on > reality is the > friendship I share with my collection of singing potatoes > > \|/ ____ \|/ > ~@-/ oO \-@~ > /_( \__/ )_\ > \__U_/ > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu