dacenrie
Joined: 02 Mar 2006 Posts: 16
|
Capture and PWM Modules |
Posted: Thu Apr 19, 2007 11:11 am |
|
|
Hi everyone,
I am receiving the same square wave signal on the CCP1 and CCP2 pins. They have been set to capture mode, with CCP1 capturing the rising edge and CCP2 capturing the falling edge. I WANT TO MEASURE THE PERIOD AND DUTY CYCLE.
Now here is the most important part:
HOW DO I TAKE THE PERIOD AND DUTY CYCLE MEASURED AND LOAD IT INTO CCP3 (PWM MODE) SO THAT THE SAME SIGNAL BEING CAPTURED IS THE SAME SIGNAL BEING SENT OUT THROUGHT THE PWM OUTPUT???
I am using the PIC16F737 (8MHz internal oscillator).
Here is a quick guideline:
1.) Measure period
2.) Measure duty cycle
3.) Load measured period and duty cycle into pwm output.
Thanks for all your help. |
|