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.

Accurate method for counting pulses using PIC

Status
Not open for further replies.

beserk

Newbie level 1
Joined
Jun 8, 2005
Messages
0
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,280
Activity points
1,285
What are the different methods to measure frequency of pulses upto 500Hz?
Which one is more accurate ?
 

Hi !

Timer1 can count up to 65535 (16 bits) and can accept external pulses. This is in my opinion the easier and more accurate way to measure low frequency pulses. Just let the timer1 (in fact a counter) working for exact 1 second, stop it and read the registers (TMR1H and TMR1L) contents, this is the frequency value. For a new reading, just clear both registers, enable the timer again, wait 1 second and restart the procedure.

Another way is to use PICmicros with CCP modules (Capture Compare PWM) using the Capture feature to measure the period between two pulses. You have to calculate the frequency (1/T). You shall lose some accuracy because the period time will be rounded (to integer) in the registers.
 

    beserk

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top