A very simple easy to make Frequency counter project. This project is powered with small AT89C2051 microcontroller with LCD. Block Diagram of circuit is shown below. It can support a wide range of frequency input starting from 1Hz to ~16.5Mhz, rest depends on pin characteristics.

Theory of Operation
As we all know frequency of a signal is number of cycles per second. I made use of this logic to calculate frequency of the input signal.

8051 has two timers, Timer 0 is configured for 1 second delay to sample the input signal and Timer 1 is used as a counter to calculate number of cycles in that 1 second. If timer1 overflows then the overflow is counter in another register which is considered as the high byte of Frequency. Input signal is provided at P3.5/T1 which is input for Timer 1 in counter mode. LCD is connected to microcontroller port 1 in 4-bit mode. Currently program is using 2 Line LCD but it can be used for 1 line LCD too.

Program initializes the Timer0 in 16-bit mode with 50mS delay value, a tick value of 20 is loaded to have total delay of 1s (50 x 20 = 1000 mS). Timer 1 is configured in 16-bit counter mode. After a sample of 1 sec, we get the number of cycles hence the frequency of input signal from timer1 registers (TH1:TL1) and high byte of Frequency. So total 3 byte value is then converted to a decimal equivalent represented in hex. This decimal value is then updated to LCD. The whole process repeats again.



For any doubts and suggestions please use forum

Download: Frequency Counter using AT89C2051 and LCD (Assembly)
Tags Frequency Counter using AT89C2051 and LCD8051 projectsFrequency counter project
printer friendly create pdf of this news item

Submit comment

(Required; Min length 5)
(Required; will not be displayed)

Conversation

Mon Jan 16 2017, 03:15 PM
Rutuja
How can we read notepad file using random acess file
Fri Jan 06 2017, 06:18 AM
muhammad Umar
i need cd4047 library file for protious please help me i s
ExperimenterUK
Wed Jan 04 2017, 09:01 PM
@Emin what is your site user name ?
Tue Jan 03 2017, 11:16 PM
Emin
Emin: I'm already a member since 2012 and entered repeatedly during period. But now it is impossible and obtaining a new registration is also failed. The same error message specifying that two e-mails i entered are different!. In fact thaey are the same. Now, what will be happen, what is your solution? Thanks..
Tue Jan 03 2017, 11:15 PM
Emin
I'm already a member since 2012 and entered repeatedly during period. But now it is impossible and obtaining a new registration is also failed. The same error message specifying that two e-mails i entered are different!. In fact thaey are the same. Now, what will be happen, what is your solution? Thanks..
Sun Jan 01 2017, 03:14 PM
Manoranjana Chary
Write an embedded program of increment and decrement in LCD connected to two keys of int1 and int0. Can u please send me the code for this as fast as possible because i need to submit it in college kindly
ExperimenterUK
Sat Dec 31 2016, 06:28 PM
Happy New Year everyone
ExperimenterUK
Sat Dec 31 2016, 06:27 PM
Please post questions in the forum, the chat box is for chat
Thu Dec 29 2016, 07:47 AM
drashti ranolia
can anyone help me for the microcontroller 8051 programming code for street lights that glow on vehicle movement using IR sensors ?
Tue Dec 27 2016, 11:45 AM
Shubhangi
Do we have to write lookup table for d6t thermal sensor?

Downloads

Comments

sarfrosh92
Sun Jan 15 2017, 09:18 AM
Deepakvaishu
Wed Jan 11 2017, 10:25 AM
rana_jee773
Sat Dec 10 2016, 11:22 AM
[email protected]
Thu Dec 08 2016, 11:02 AM
Jonathan.kei
Mon Nov 21 2016, 04:30 PM
AVRuser1
Sun Nov 20 2016, 06:07 PM
JaguarPaw
Thu Nov 17 2016, 07:44 PM
PeterJohn
Mon Nov 14 2016, 05:54 PM

Online

Guests: 55, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 37796
Newest member: sarfrosh92
Forum Activity
Deepakvaishu Avatar
Posted By Deepakvaishu
Mon Jan 16 2017, 08:31 AM
you are right ..I should not include '\' at t...
Deepakvaishu Avatar
Posted By Deepakvaishu
Mon Jan 16 2017, 06:07 AM
No ,its not the null character, its just the '...
sankalp_s Avatar
Posted By sankalp_s
Sun Jan 15 2017, 07:55 PM
There is a fault in your Proteus design.If you loo...
sarfrosh92 Avatar
Posted By sarfrosh92
Sun Jan 15 2017, 10:04 AM
The 8051 Microcontroller (3rd Edition) by I. Scott...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Jan 14 2017, 11:59 PM
The site editor may have removed the 0 from \0.Actually it should not be needed, sochar *phone_no[3 ]={"1234567890" ," 9087654321" ,"76676667676"}; //array of pointers should work.
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Jan 14 2017, 11:54 PM
There is a fault in your Proteus design.If you loo...
sankalp_s Avatar
Posted By sankalp_s
Fri Jan 13 2017, 06:52 PM
Hi phill sir.. testButton1: ...
Deepakvaishu Avatar
Posted By Deepakvaishu
Fri Jan 13 2017, 11:58 AM
suppose i have this arraychar *phone_no[3 ]={"1234...
ajay_bhargav Avatar
Posted By ajay_bhargav
Fri Jan 13 2017, 05:59 AM
You need to send AT command one by one to all the ...
Deepakvaishu Avatar
Posted By Deepakvaishu
Wed Jan 11 2017, 10:47 AM
How to send the same message to multiple contacts ...