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

Fri Sep 29 2017, 02:45 AM
Maaz
i am doing the same project on verilog please contact me [email protected]
Wed Sep 20 2017, 12:36 AM
Ted
In a missing pulse detector using a 555 timer connected as a monostable vibrator with a PNP transistor,how does the positve input pulse turn on the PNP transistor?
Sun Sep 03 2017, 02:29 PM
martymarty
How do I connect an <NOKIA 1100 LCD > to an atmega328P ?
poojab51296
Sun Aug 20 2017, 10:23 AM
i am intending to interface sd card with STM32F4 and want to write a file in sd card using SPI protocol but using HAL only. Can anyone help me PLEASE!!!!
poojab51296
Sun Aug 20 2017, 10:22 AM
hello
rawat742
Fri Aug 18 2017, 11:37 AM
hi @ angel patel i will attach a file i hope it will be helpfull for you
ExperimenterUK
Mon Aug 14 2017, 09:57 PM
@ angel patel... just log in and post your problem
Mon Aug 14 2017, 01:45 PM
angel patel
hey any one help to make the led scrolling display
desuza6
Sat Jul 29 2017, 07:09 AM
I see the code for step motor h l 298 to rotate 45 degree, but all delay time, if I want to input sensor to h the pulses to stepmotor
rammichael
Thu Jul 27 2017, 12:05 PM
okay fine

Downloads

Comments

lohithaSrinivas
Mon Oct 23 2017, 06:51 AM
aalootazyloo
Sat Oct 21 2017, 08:07 AM
bvdb
Wed Oct 18 2017, 01:45 AM
TinkeringJoe
Sun Oct 15 2017, 02:23 AM
Tubai96
Thu Oct 12 2017, 05:30 PM
roberttku
Thu Oct 12 2017, 08:02 AM
Bdavid.sam
Mon Oct 09 2017, 02:23 PM
SUNSHINE
Thu Oct 05 2017, 03:54 AM

Online

Guests: 72, Members: 0 ...

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

Members: 37904
Newest member: lohithaSrinivas
Forum Activity
bvdb Avatar
Posted By bvdb
Wed Oct 18 2017, 01:50 AM
I purchased the RKitL51 8051 C compiler from Raiso...
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Oct 16 2017, 11:44 PM
That looks complicated.Is 8051_BLK a standard 80...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sun Oct 15 2017, 07:29 PM
According to this, gmail should support POP3.https...
Help Avatar
Posted By Help
Sun Oct 15 2017, 03:21 AM
AT+POP3READ=? +POP3READ: (1-1460) OK AT+POP3READ=...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Oct 14 2017, 08:06 PM
What happens if you ask for the full email ieAT+PO...
Help Avatar
Posted By Help
Sat Oct 14 2017, 02:28 AM
Dear all, AT // OK // 3.1 Bearer profile // Conf...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Oct 12 2017, 01:04 AM
I don't think the 0804 works as it should in Prote...
Bdavid.sam Avatar
Posted By Bdavid.sam
Wed Oct 11 2017, 01:54 AM
Are you simulating in Orcad ?Please post your cod...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Oct 10 2017, 09:43 PM
Are you simulating in Orcad ?Please post your cod...
Bdavid.sam Avatar
Posted By Bdavid.sam
Mon Oct 09 2017, 02:38 PM
Hello, This might be a beginner’s mistake but I a...