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

Sun Apr 30 2017, 05:49 AM
Lijin G Varghese
Can u send me the circuit diagram for Program to interface GSM Module with 8051 microcontroller (AT89C51) using PC and LCD
Sun Apr 30 2017, 05:48 AM
Lijin G Varghese
Program to interface GSM Module with 8051 microcontroller (AT89C51) using PC and LCD
Fri Apr 28 2017, 03:47 PM
SANDEEP T S
I need pcb wizard 3.5 version kindly send valid link of yours
Fri Apr 28 2017, 03:46 PM
SANDEEP T S
I need pcb wizard 3.5 version
ExperimenterUK
Mon Apr 17 2017, 11:56 PM
Sorry..We had a problem with registration.Confirmation emails were not sent.Please re-register
Thu Apr 13 2017, 07:29 PM
Piyush Aughad
I want circuit & program for radar detection using Microcontroller 8051
Tue Apr 11 2017, 03:27 AM
Shabbir Ahmed
Hi Ajay ....hope you and your family all will be fine are you working on andriod aplications if yes then plz reply me
Sun Apr 09 2017, 06:33 PM
ATHULYA NAIR
Dear Sir, I need to know what are the complexity for programming in 8051 Microcontroller for three phase inverter?
Sun Apr 09 2017, 06:32 PM
ATHULYA NAIR
Dear Sir,
Sun Apr 09 2017, 04:43 AM
Rohit chandra joshi
Sir I need ur help urgently.i am trying to make pc controlled led scrolling display using 8051.when i am trying to generate hex file of the code that is given by pratik suthar.it gives the error Target not created Limit:0800h I am using keil uvision4 software. Even i have tried to burn the given hex file that is atteched with the code but my led are not glowing. Pls help me sir .i struck in this problem from last month and till now i am not able to short out the problem. Pls suggest me to solve the problem.mail me at [email protected] Thanks

Downloads

Comments

anshulece
Fri Apr 28 2017, 03:43 PM
Masoooud
Tue Apr 25 2017, 06:57 PM
BOuissal
Mon Apr 24 2017, 02:46 PM
tranhunga
Mon Apr 24 2017, 01:11 AM
Suslik
Sun Apr 23 2017, 09:26 AM
soumk
Sun Apr 23 2017, 06:22 AM
Vavachi1996
Tue Apr 18 2017, 08:01 PM
yasmine
Tue Apr 18 2017, 03:10 PM

Online

Guests: 68, Members: 0 ...

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

Members: 37814
Newest member: anshulece
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon May 01 2017, 12:42 AM
Sorry, that doesn't sound "normal".I think a re-in...
Deepakvaishu Avatar
Posted By Deepakvaishu
Fri Apr 28 2017, 11:18 AM
Yes proteus is loaded ,with all projects.....Once ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Apr 28 2017, 05:06 AM
Does Proteus load at all ?Does it only crash on c...
Deepakvaishu Avatar
Posted By Deepakvaishu
Wed Apr 26 2017, 06:59 AM
hello...I am getting an error when I am trying to ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Apr 18 2017, 10:52 PM
Thanks for the comment.Glad you got it working.
Deepakvaishu Avatar
Posted By Deepakvaishu
Tue Apr 18 2017, 06:19 AM
Thank you very much...Today I got the output for a...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Apr 06 2017, 05:38 PM
Is it initially assigned as '0', and then when the...
Deepakvaishu Avatar
Posted By Deepakvaishu
Thu Apr 06 2017, 07:55 AM
hello,Thanks for the attachment.I have gone throug...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Mar 25 2017, 09:49 PM
I have attached code showing one method you could ...
Deepakvaishu Avatar
Posted By Deepakvaishu
Sat Mar 25 2017, 07:59 AM
I am using Keil and 8051 microcontroller