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.

Mains frequency measurement

Status
Not open for further replies.
Frequency is measure in cycles per second so all you have to do is measure the cycles in a one second period. For low frequencies it is easier to do the reverse, measure the period (duration of one input cycle) and use the relationship f = 1/period to produce the result.

Start by making sure your input signal is at a suitable voltage to operate your frequency meter, this will involve some analog circuitry but without knowing the voltage range you need we can't help more on that. Then establish an accurate frequency to measure against, a crystal on the PIC oscillator should suffice. Your options then are:

Measure frequency by -
1. make a cycle count zero
2. start a one second time period
3. count the cycles until the one second is finished.

The result is in cycles per second.

Measure period by -

1. make a clock counter zero
2. wait for the start of your input signal cycle
3. start counting clock pulses until the end of your input signal cycle
4. knowing how long each clock cycle lasted, work out the frequency based on how many there were within one cycle of your input signal.

Brian.
 

Frequency is measure in cycles per second so all you have to do is measure the cycles in a one second period. For low frequencies it is easier to do the reverse, measure the period (duration of one input cycle) and use the relationship f = 1/period to produce the result.

Start by making sure your input signal is at a suitable voltage to operate your frequency meter, this will involve some analog circuitry but without knowing the voltage range you need we can't help more on that. Then establish an accurate frequency to measure against, a crystal on the PIC oscillator should suffice. Your options then are:

Measure frequency by -
1. make a cycle count zero
2. start a one second time period
3. count the cycles until the one second is finished.

The result is in cycles per second.

Measure period by -

1. make a clock counter zero
2. wait for the start of your input signal cycle
3. start counting clock pulses until the end of your input signal cycle
4. knowing how long each clock cycle lasted, work out the frequency based on how many there were within one cycle of your input signal.

Brian.

I have in-built CCP in this controller(PIC16F946).How to configure that to read frequency
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top