Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Why we use Capture CCP of PIC microprossesor

Status
Not open for further replies.

YIM bunchhat

Member level 2
Member level 2
Joined
Oct 19, 2010
Messages
46
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,580
I want to know why we use CCP pin of PIC as capture?
 

The Input Capture Mode of a PIC is useful to measure the exact time when an input signal changes. When the input signal changes the CCP hardware in the PIC latches the current value of a free-running timer in some latches that the program can read later. If you didn't have Input Capture and you wanted to time some input then you would have to let the input cause an interrupt. Then in the interrupt service routine the program would read the timer. The trouble is the interrupt does not always occur right away because sometimes interrupts are disabled for a time. So when you read the timer, some time may go by and the value you read may be a little late, and so not as accurate as it could be. But with the CCP hardware in the PIC the timer is latched immediately so when the program gets around to reading that latch the value in that latch will be as accurate as it can be, even if the program was a little delayed in doing the reading.
 
Thank you Tunelabguy, I ask about Captuer CCP of PIC because I want to make frequency mesurement tool. Can you show me any code about how to make Captuer CCP work?
 

How you measure frequency depends on the frequency range involved, response time, and accuracy. Very different techniques would be used, depending on these things.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top