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

Reading pulse widths

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







Reading pulse widths
PostPosted: Tue Oct 24, 2006 7:53 am     Reply with quote

I am trying to take measurements of the folling waveform coming in at 400Hz and want to sync an output to the wider of the 2 pulses. I am using a 18F458 proto board. any ideas on how this can be accomplished

--- -- -----
|_____| |___|
the first pulse is 2.08 ms the second 1.96 ms with 460 us between them at a 400 hz rate.

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Oct 26, 2006 2:56 pm     Reply with quote

The CCP module can be used (in Capture mode) to do this.

See this CCS example file:
c:\program files\picc\examples\ex_ccpmp.c

Here's a CCS example file with another method:
c:\program files\picc\examples\ex_pulse.c
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