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.

Frequency measurement

Status
Not open for further replies.

hemnath

Advanced Member level 3
Advanced Member level 3
Joined
Jun 24, 2012
Messages
702
Helped
61
Reputation
120
Reaction score
57
Trophy points
1,308
Location
Chennai
Visit site
Activity points
6,589
I have measured the frequency using PIC micro-controller, but the accuracy is not good at higher frequency.

I have an idea for the better accuracy. I'm going to measure the no. of pulses occurred in a specific time duration(say about 100msec). That will give the frequency with better accuracy.

But i don't know how to count the rising edges during the 100 msec time interval. Please help

Thanks in advance :)
 

Use one AND gate & connect a 100mS pulse generated from a uC port pin. Connect the output to the microcontroller Timer 1 clock input & configure the timer1 as a counter... reset the timer before you apply the 100mS pulse...
 

use external interrupt
use timer1 and load it with a value and scale it to form a sub multiple of 1 second and timer 1 overflow interrupt
on each ext_int increase variable frequency
after one second read variable frequency and it should be actual if you are using exact calculations
 

hello,

.....
it should be actual if you are using exact calculations

if you are using prescaler different of 1/1
don't forget to add remaining counts inside prescaler to the global counting.
and survey timer overflow counting wich can occurs for high frequency...
you must add nb of overflow x 65536 to the final counting.
 

try to measure your Quartz itself !

What error do you get and at what frequency...

for comparaison it's what i get with mine

wct7_LCD.asm
avec correction +20 nop dans la boucle "Gate" et +16 nop en final
Ref . Affichage Mesure Gamme Error
4.000.000 Hz 4000065 Hz FREQ (1) -0.0016%
25.000 Hz 25000 Hz FREQ (1) 0
234.375 Hz 234374 Hz FREQ (1) 0.0004%
60,0 Mhz 59.9993 MHz VHF (2) 0.0012%
20,0 Mhz 19.9998 MHz VHF (2) 0.0010%
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top