CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Capture and PWM Modules

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
dacenrie



Joined: 02 Mar 2006
Posts: 16

View user's profile Send private message

Capture and PWM Modules
PostPosted: Thu Apr 19, 2007 11:11 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group