What you are trying to do is possible. I have played around with something simular and got a 16F84 to do it. The two RC pulse that you wish to measure if they are comming from the same reciever will be 20ms apart. So in the system I am using I have OR'd the pulses toeather and run them both in to RB0 interupt port. I have then run one of the pulses in to another port as well to allow the code to determin which pulse it has been interupted by. The dual PWM is easy. The most difficult part of what you want to do is how to convert the length of the pulses in to the number that you need to put in to the PWM routien. When I did it. It has taken a lot of 16bit maths to get someting that gives a enough resoulution. Another idear may be to dump the 16F84 and use one of the newer pics with more functions eg 16bit timers and hardware PWM generators eg 16F627 or 16F628 (still 18 pin package) Paul Harris ----- Original Message ----- from: Mike Evans date: Friday, April 20, 2001 11:50 pm subject: [PIC]: Newbie - RC receiver to 2xPWM outputs with a 16F84 > This is my first ever post the list, I've been sitting listen for > a few months now.... You all seem like a helpful lot. > > I'm trying to write some code that takes two radio control servo > inputs (forward/reverse on one channel, left/right on the other) > and mixes them together to provide two PWM outputs suitable for > driving FET H-bridges for a small radio-controlled robot. > > I've got as far as measuring the pulse length of one servo input > and using an ISR I can generate a PWM signal from this, my problem > is adding the second channel - the timing goes to pot! (My ISR > generates the PWM to give a fixed-frequency, but this means my > main loop that measures the servo input gets interrupted a hell of > a lot - am I doing this the right way round?) > > I feel like I'm almost there, but I'm also convinced that someone > _must_ have done this before. I've checked the archives and found > nothing. > I suppose my question is: Is generating two PWMs whilst reading > two inputs too much for one 16F84 to cope with or am I looking in > the wrong place for the solution? > > Any help appreciated. Mike. > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics