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 counter with pic16f877a

Status
Not open for further replies.

john120

Banned
Full Member level 5
Joined
Aug 13, 2011
Messages
257
Helped
11
Reputation
22
Reaction score
10
Trophy points
1,298
Visit site
Activity points
0
can you plz help me to count the frequency and display it on the lcd (4 bit mode).

Thanks
 

Frequency of what pulse input or AC? If pulse you have to use RB0/INT pin for pulse input. If AC then you have to use a circuit to convert AC freq to pulse. Write interrupt code where a counter gets incremented for every external interrupt on pin RB0. Get total interrupts for 10 ms then calculate how many interrupts you get for 1000 ms (1 sec) and it will give the frequency. If you get 500 interrupts for 10 ms then (500 * 1000 ms)/10 ms gives interrupts for 1 sec which is the frequency.

See these projects http://embedded-lab.com/blog/?p=1953
http://icanbuild.it/wiki/index.php?title=Timer0_Counting_AC_Line_Frequency
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top