Hi Andy, Almost a correct guess. What I'm actually doing is using the capture input to read from and Analog devices accelerometer (which generates a PWM style output prop to the G force). But yes the compare part of the CCP is being used to generate an RC pulse! Actually I think I can simply switch between the two (I have the time available), I want to keep the two PWM chans to generate a set of PWM outputs for speed control! Thanks Andy ----- Original Message ----- From: "Andrew Kunz" To: Sent: Tuesday, October 17, 2000 5:23 PM Subject: Re: [PIC]: Using 2 CCP: Compare failed if Capture event the same time > Andy, > > You can still use them as you want I think. I suspect you want to read a servo > pulse in, modify it, and send it out. > > If that's the case, you are fine. > > Instead of using compare, use one for capture, one for PWM. > > The capture one you operate by watching for high, then for low. The capture > input value will give you what Timer1 was at the time of the rising/falling > edge. You only need to subtract to find the pulse width. > > For the output channel, you can simply tell it to generate the pulses as you > want. They will be all synched to TMR0 = 0. > > Also, timing is not especially critical on either of these things - no need to > do it in an interrupt if you aren't really busy. The values will be retained > until the next change. > > Think about using TMR2 as a frame timer... > > This is what I did for several of my products, and it works fine. > > Andy > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > use mailto:listserv@mitvma.mit.edu?body=SET%20PICList%20DIGEST > > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu